/*!
 * File:        dataTables.editor.min.js
 * Version:     1.6.2
 * Author:      SpryMedia (www.sprymedia.co.uk)
 * Info:        http://editor.datatables.net
 *
 * Copyright 2012-2017 SpryMedia Limited, all rights reserved.
 * License: DataTables Editor - http://editor.datatables.net/license
 */
(function (factory) {
	if (typeof define === 'function' && define.amd) {
		define(['jquery', 'datatables.net'], function ($) {
			return factory($, window, document);
		});
	}
	else if (typeof exports === 'object') {
		module.exports = function (root, $) {
			if (!root) {
				root = window;
			}
			if (!$ || !$.fn.dataTable) {
				$ = require('datatables.net')(root, $).$;
			}
			return factory($, root, root.document);
		};
	}
	else {
		factory(jQuery, window, document);
	}
}(function ($, window, document, undefined) {
	'use strict';

	var DataTable = $.fn.dataTable;
	if (!DataTable || !DataTable.versionCheck || !DataTable.versionCheck('1.10.7')) {
		throw 'Editor requires DataTables 1.10.7 or newer';
	}
	var Editor = function (opts) {
		if (!(this instanceof Editor)) {
			alert('DataTables Editor must be initialised as a "new" instance');
		}
		this._constructor(opts);
	};
	DataTable.Editor = Editor;
	$.fn.DataTable.Editor = Editor;

	var __inlineCounter = 0,
			_editor_el = function (dis, ctx) {
				if (ctx === undefined) {
					ctx = document;
				}
				return $('*[data-dte-e="' + dis + '"]', ctx);
			},
			_pluck = function (a, prop) {
				var out = [];
				$.each(a, function (idx, element) {
					out.push(element[prop]);
				});
				return out;
			},
			_api_file = function (name, id) {
				var table = this.files(name), file = table[id];
				if (!file) {
					throw 'Unknown fileservice id ' + id + ' in table ' + name;
				}
				return table[id];
			},
			_api_files = function (name) {
				if (!name) {
					return Editor.files;
				}
				var table = Editor.files[name];
				if (!table) {
					throw 'Unknown fileservice table name: ' + name;
				}
				return table;
			},
			_objectKeys = function (o) {
				var out = [];
				for (var key in o) {
					if (o.hasOwnProperty(key)) {
						out.push(key);
					}
				}
				return out;
			},
			_deepCompare = function (o1, o2) {
				if (typeof o1 !== 'object' || typeof o2 !== 'object') {
					return o1 === o2;
				}
				var o1Props = _objectKeys(o1), o2Props = _objectKeys(o2);
				if (o1Props.length !== o2Props.length) {
					return false;
				}
				for (var i = 0, ien = o1Props.length; i < ien; i++) {
					var propName = o1Props[i];
					if (typeof o1[propName] === 'object') {
						if (!_deepCompare(o1[propName], o2[propName])) {
							return false;
						}
					}
					else if (o1[propName] !== o2[propName]) {
						return false;
					}
				}
				return true;
			};

	Editor.Field = function (opts, classes, host) {
		var that = this, multiI18n = host.i18n.multi;
		opts = $.extend(true, {}, Editor.Field.defaults, opts);
		if (!Editor.fieldTypes[opts.type]) {
			throw 'Error adding field - unknown field type ' + opts.type;
		}
		this.s = $.extend({}, Editor.Field.settings, {
			type: Editor.fieldTypes[opts.type],
			name: opts.name,
			classes: classes,
			host: host,
			opts: opts,
			multiValue: false
		});
		if (!opts.id) {
			opts.id = 'DTE_Field_' + opts.name;
		}
		if (opts.dataProp) {
			opts.data = opts.dataProp;
		}
		if (opts.data === '') {
			opts.data = opts.name;
		}
		var dtPrivateApi = DataTable.ext.oApi;
		this.valFromData = function (d) {
			return dtPrivateApi._fnGetObjectDataFn(opts.data)(d, 'editor');
		};
		this.valToData = dtPrivateApi._fnSetObjectDataFn(opts.data);
		var template = $('<div class="' + classes.wrapper + ' ' + classes.typePrefix + opts.type + ' ' + classes.namePrefix + opts.name + ' ' + opts.className + '">'
						+ '		<label data-dte-e="label" class="' + classes.label + '" for="' + opts.id + '">' + opts.label
						+ '			<div data-dte-e="msg-label" class="' + classes['msg-label'] + '">' + opts.labelInfo + '</div>'
						+ '		</label>'
						+ '		<div data-dte-e="input" class="' + classes.input + '">'
						+ '			<div data-dte-e="input-control" class="' + classes.inputControl + '"/>'
						+ '			<div data-dte-e="multi-value" class="' + classes.multiValue + '">' + multiI18n.title
						+ '				<span data-dte-e="multi-info" class="' + classes.multiInfo + '">' + multiI18n.info + '</span>'
						+ '			</div>'
						+ '			<div data-dte-e="msg-multi" class="' + classes.multiRestore + '">' + multiI18n.restore + '</div>'
						+ '			<div data-dte-e="msg-error" class="' + classes['msg-error'] + '"></div>'
						+ '			<div data-dte-e="msg-message" class="' + classes['msg-message'] + '">' + opts.message + '</div>'
						+ '			<div data-dte-e="msg-info" class="' + classes['msg-info'] + '">' + opts.fieldInfo + '</div>'
						+ '		</div>'
						+ '</div>'
				),
				input = this._typeFn('create', opts);

		if (input !== null) {
			_editor_el('input-control', template).prepend(input);
		} else {
			template.css('display', "none");
		}

		this.dom = $.extend(true, {}, Editor.Field.models.dom, {
			container: template,
			inputControl: _editor_el('input-control', template),
			label: _editor_el('label', template),
			fieldInfo: _editor_el('msg-info', template),
			labelInfo: _editor_el('msg-label', template),
			fieldError: _editor_el('msg-error', template),
			fieldMessage: _editor_el('msg-message', template),
			multi: _editor_el('multi-value', template),
			multiReturn: _editor_el('msg-multi', template),
			multiInfo: _editor_el('multi-info', template)
		});
		this.dom.multi.on('click', function () {
			if (that.s.opts.multiEditable && !template.hasClass(classes['disabled'])) {
				that.val('');
			}
		});
		this.dom.multiReturn.on('click', function () {
			that.s.multiValue = true;
			that._multiValueCheck();
		});
		$.each(this.s.type, function (name, fn) {
			if (typeof fn === 'function' && that[name] === undefined) {
				that[name] = function () {
					var args = Array.prototype.slice.call(arguments);
					args.unshift(name);
					var ret = that._typeFn.apply(that, args);
					return ret === undefined ? that : ret;
				};
			}
		});
	};
	Editor.Field.prototype = {
		def: function (set) {
			var opts = this.s.opts;
			if (set === undefined) {
				var def = opts.default !== undefined ? opts.default : opts.def;
				return $.isFunction(def) ? def() : def;
			}
			opts.def = set;
			return this;
		},
		disable: function () {
			this.dom.container.addClass(this.s.classes.disabled);
			this._typeFn('disable');
			return this;
		},
		displayed: function () {
			var container = this.dom.container;
			return container.parents('body').length && container.css('display') != 'none';
		},
		enable: function () {
			this.dom.container.removeClass(this.s.classes.disabled);
			this._typeFn('enable');
			return this;
		},
		error: function (msg, fn) {
			var classes = this.s.classes;
			if (msg) {
				this.dom.container.addClass(classes.error);
			} else {
				this.dom.container.removeClass(classes.error);
			}
			this._typeFn('errorMessage', msg);
			return this._msg(this.dom.fieldError, msg, fn);
		},
		fieldInfo: function (msg) {
			return this._msg(this.dom.fieldInfo, msg);
		},
		isMultiValue: function () {
			return this.s.multiValue && this.s.multiIds !== 1;
		},
		inError: function () {
			return this.dom.container.hasClass(this.s.classes.error);
		},
		input: function () {
			return this.s.type.input ? this._typeFn('input') : $('input, select, textarea', this.dom.container);
		},
		focus: function () {
			if (this.s.type.focus) {
				this._typeFn('focus');
			} else {
				$('input, select, textarea', this.dom.container).focus();
			}
			return this;
		},
		get: function () {
			if (this.isMultiValue()) {
				return undefined;
			}
			var val = this._typeFn('get');
			return val !== undefined ? val : this.def();
		},
		hide: function (animate) {
			var el = this.dom.container;
			if (animate === undefined) {
				animate = true;
			}
			if (this.s.host.display() && animate) {
				el.slideUp();
			} else {
				el.css('display', 'none');
			}
			return this;
		},
		label: function (str) {
			var label = this.dom.label;
			if (str === undefined) {
				return label.html();
			}
			label.html(str);
			return this;
		},
		labelInfo: function (msg) {
			return this._msg(this.dom.labelInfo, msg);
		},
		message: function (msg, fn) {
			return this._msg(this.dom.fieldMessage, msg, fn);
		},
		multiGet: function (id) {
			var value, multiValues = this.s.multiValues, multiIds = this.s.multiIds;
			if (id === undefined) {
				value = {};
				for (var i = 0; i < multiIds.length; i++) {
					value[multiIds[i]] = this.isMultiValue() ? multiValues[multiIds[i]] : this.val();
				}
			} else if (this.isMultiValue()) {
				value = multiValues[id];
			} else {
				value = this.val();
			}
			return value;
		},
		multiSet: function (id, val) {
			var multiValues = this.s.multiValues, multiIds = this.s.multiIds;
			if (val === undefined) {
				val = id;
				id = undefined;
			}
			var set = function (idSrc, val) {
				if ($.inArray(multiIds) === -1) {
					multiIds.push(idSrc);
				}
				multiValues[idSrc] = val;
			};

			if ($.isPlainObject(val) && id === undefined) {
				$.each(val, function (idSrc, innerVal) {
					set(idSrc, innerVal);
				});
			} else if (id === undefined) {
				$.each(multiIds, function (i, idSrc) {
					set(idSrc, val);
				});
			} else {
				set(id, val);
			}

			this.s.multiValue = true;
			this._multiValueCheck();
			return this;
		},
		name: function () {
			return this.s.opts.name;
		},
		node: function () {
			return this.dom.container[0];
		},
		set: function (val, multiCheck) {
			var decodeFn = function (d) {
				return typeof d !== 'string' ? d : d.replace(/&gt;/g, '>').replace(/&lt;/g, '<').replace(/&amp;/g, '&').replace(/&quot;/g, '"').replace(/&#39;/g, '\'').replace(/&#10;/g, '\n');
			};
			this.s.multiValue = false;
			var decode = this.s.opts.entityDecode;
			if (decode === undefined || decode === true) {
				if ($.isArray(val)) {
					for (var i = 0, ien = val.length; i < ien; i++) {
						val[i] = decodeFn(val[i]);
					}
				} else {
					val = decodeFn(val);
				}
			}
			this._typeFn('set', val);
			if (multiCheck === undefined || multiCheck === true) {
				this._multiValueCheck();
			}
			return this;
		},
		show: function (animate) {
			var el = this.dom.container;
			if (animate === undefined) {
				animate = true;
			}
			if (this.s.host.display() && animate) {
				el.slideDown();
			} else {
				el.css('display', 'block');
			}
			return this;
		},
		val: function (val) {
			return val === undefined ? this.get() : this.set(val);
		},
		dataSrc: function () {
			return this.s.opts.data;
		},
		destroy: function () {
			this.dom.container.remove();
			this._typeFn('destroy');
			return this;
		},
		multiEditable: function () {
			return this.s.opts.multiEditable;
		},
		multiIds: function () {
			return this.s.multiIds;
		},
		multiInfoShown: function (show) {
			this.dom.multiInfo.css({display: show ? 'block' : 'none'});
		},
		multiReset: function () {
			this.s.multiIds = [];
			this.s.multiValues = {};
		},
		valFromData: null,
		valToData: null,
		_errorNode: function () {
			return this.dom.fieldError;
		},
		_msg: function (el, msg, fn) {
			if (msg === undefined) {
				return el.html();
			}
			if (typeof msg === 'function') {
				var editor = this.s.host;
				msg = msg(editor, new DataTable.Api(editor.s.table));
			}
			if (el.parent().is(":visible")) {
				el.html(msg);
				if (msg) {
					el.slideDown(fn);
				} else {
					el.slideUp(fn);
				}
			} else {
				el.html(msg || '').css('display', msg ? 'block' : 'none');
				if (fn) {
					fn();
				}
			}
			return this;
		},
		_multiValueCheck: function () {
			var last, ids = this.s.multiIds, values = this.s.multiValues, isMultiValue = this.s.multiValue, isMultiEditable = this.s.opts.multiEditable, val, different = false;
			if (ids) {
				for (var i = 0; i < ids.length; i++) {
					val = values[ids[i]];
					if (i > 0 && !_deepCompare(val, last)) {
						different = true;
						break;
					}
					last = val;
				}
			}
			if ((different && isMultiValue) || (!isMultiEditable && isMultiValue)) {
				this.dom.inputControl.css({display: 'none'});
				this.dom.multi.css({display: 'block'});
			} else {
				this.dom.inputControl.css({display: 'block'});
				this.dom.multi.css({display: 'none'});
				if (isMultiValue && !different) {
					this.set(last, false);
				}
			}
			this.dom.multiReturn.css({display: ids && ids.length > 1 && different && !isMultiValue ? 'block' : 'none'});
			var i18n = this.s.host.i18n.multi;
			this.dom.multiInfo.html(isMultiEditable ? i18n.info : i18n.noMulti);
			this.dom.multi.toggleClass(this.s.classes.multiNoEdit, !isMultiEditable);
			this.s.host._multiInfo();
			return true;
		},
		_typeFn: function (name) {
			var args = Array.prototype.slice.call(arguments);
			args.shift();
			args.unshift(this.s.opts);
			var fn = this.s.type[name];
			if (fn) {
				return fn.apply(this.s.host, args);
			}
		}
	};
	Editor.Field.models = {};
	Editor.Field.defaults = {
		className: '',
		data: '',
		def: '',
		fieldInfo: '',
		id: '',
		label: '',
		labelInfo: '',
		name: null,
		type: 'text',
		message: '',
		multiEditable: true
	};
	Editor.Field.models.settings = {type: null, name: null, classes: null, opts: null, host: null};
	Editor.Field.models.dom = {container: null, label: null, labelInfo: null, fieldInfo: null, fieldError: null, fieldMessage: null};
	Editor.models = {};
	Editor.models.displayController = {
		init: function (dte) {
		},
		open: function (dte, append, fn) {
		},
		close: function (dte, fn) {
		}
	};
	Editor.models.fieldType = {
		create: function (conf) {
		},
		get: function (conf) {
		},
		set: function (conf, val) {
		},
		enable: function (conf) {
		},
		disable: function (conf) {
		}
	};
	Editor.models.settings = {
		ajaxUrl: null,
		ajax: null,
		dataSource: null,
		domTable: null,
		opts: null,
		displayController: null,
		fields: {},
		order: [],
		id: -1,
		displayed: false,
		processing: false,
		modifier: null,
		action: null,
		idSrc: null,
		unique: 0
	};
	Editor.models.button = {
		label: null,
		fn: null,
		className: null
	};
	Editor.models.formOptions = {
		onReturn: 'submit',
		onBlur: 'close',
		onBackground: 'blur',
		onComplete: 'close',
		onEsc: 'close',
		onFieldError: 'focus',
		submit: 'all',
		focus: 0,
		buttons: true,
		title: true,
		message: true,
		drawType: false
	};
	Editor.display = {};

	// Editor.display.lightbox
	(function (window, document, $, DataTable) {
		var self;
		Editor.display.lightbox = $.extend(true, {}, Editor.models.displayController, {
			init: function (dte) {
				self._init();
				return self;
			},
			open: function (dte, append, callback) {
				if (self._shown) {
					if (callback) {
						callback();
					}
					return;
				}
				self._dte = dte;
				var content = self._dom.content;
				content.children().detach();
				content.append(append).append(self._dom.close);
				self._shown = true;
				self._show(callback);
			},
			close: function (dte, callback) {
				if (!self._shown) {
					if (callback) {
						callback();
					}
					return;
				}
				self._dte = dte;
				self._hide(callback);
				self._shown = false;
			}
			,
			node: function (dte) {
				return self._dom.wrapper[0];
			}
			,
			_init: function () {
				if (self._ready) {
					return;
				}
				var dom = self._dom;
				dom.content = $('div.DTED_Lightbox_Content', self._dom.wrapper);
				dom.wrapper.css('opacity', 0);
				dom.background.css('opacity', 0);
			},
			_show: function (callback) {
				var that = this, dom = self._dom;
				if (window.orientation !== undefined) {
					$('body').addClass('DTED_Lightbox_Mobile');
				}
				dom.content.css('height', 'auto');
				dom.wrapper.css({top: -self.conf.offsetAni});
				$('body').append(self._dom.background).append(self._dom.wrapper);
				self._heightCalc();
				dom.wrapper.stop().animate({opacity: 1, top: 0}, callback);
				dom.background.stop().animate({opacity: 1});
				setTimeout(function () {
					$('div.DTE_Footer').css('text-indent', -1);
				}, 10);
				dom.close.bind('click.DTED_Lightbox', function (e) {
					self._dte.close();
				});
				dom.background.bind('click.DTED_Lightbox', function (e) {
					self._dte.background();
				});

				$('div.DTED_Lightbox_Content_Wrapper', dom.wrapper).bind('click.DTED_Lightbox', function (e) {
					if ($(e.target).hasClass('DTED_Lightbox_Content_Wrapper')) {
						self._dte.background();
					}
				});
				$(window).bind('resize.DTED_Lightbox', function () {
					self._heightCalc();
				});
				self._scrollTop = $('body').scrollTop();
				if (window.orientation !== undefined) {
					var kids = $('body').children().not(dom.background).not(dom.wrapper);
					$('body').append('<div class="DTED_Lightbox_Shown"/>');
					$('div.DTED_Lightbox_Shown').append(kids);
				}
			},
			_heightCalc: function () {
				var dom = self._dom,
						maxHeight = $(window).height() - (self.conf.windowPadding * 2) - $('div.DTE_Header', dom.wrapper).outerHeight() - $('div.DTE_Footer', dom.wrapper).outerHeight();
				$('div.DTE_Body_Content', dom.wrapper).css('maxHeight', maxHeight);
			},
			_hide: function (callback) {
				var dom = self._dom;
				if (!callback) {
					callback = function () {
					};
				}
				if (window.orientation !== undefined) {
					var show = $('div.DTED_Lightbox_Shown');
					show.children().appendTo('body');
					show.remove();
				}
				$('body').removeClass('DTED_Lightbox_Mobile').scrollTop(self._scrollTop);
				dom.wrapper.stop().animate({opacity: 0, top: self.conf.offsetAni}, function () {
					$(this).detach();
					callback();
				});
				dom.background.stop().animate({opacity: 0}, function () {
					$(this).detach();
				});
				dom.close.unbind('click.DTED_Lightbox');
				dom.background.unbind('click.DTED_Lightbox');
				$('div.DTED_Lightbox_Content_Wrapper', dom.wrapper).unbind('click.DTED_Lightbox');
				$(window).unbind('resize.DTED_Lightbox');
			},
			_dte: null,
			_ready: false,
			_shown: false,
			_dom: {
				wrapper: $('<div class="DTED DTED_Lightbox_Wrapper"><div class="DTED_Lightbox_Container"><div class="DTED_Lightbox_Content_Wrapper"><div class="DTED_Lightbox_Content"></div></div></div></div>'),
				background: $('<div class="DTED_Lightbox_Background"><div/></div>'),
				close: $('<div class="DTED_Lightbox_Close"></div>'),
				content: null
			}
		});
		self = Editor.display.lightbox;
		self.conf = {offsetAni: 25, windowPadding: 25};
	}(window, document, jQuery, jQuery.fn.dataTable));

	// Editor.display.envelope
	(function (window, document, $, DataTable) {
		var self;
		Editor.display.envelope = $.extend(true, {}, Editor.models.displayController, {
			init: function (dte) {
				self._dte = dte;
				self._init();
				return self;
			},
			open: function (dte, append, callback) {
				self._dte = dte;
				$(self._dom.content).children().detach();
				self._dom.content.appendChild(append);
				self._dom.content.appendChild(self._dom.close);
				self._show(callback);
			},
			close: function (dte, callback) {
				self._dte = dte;
				self._hide(callback);
			},
			node: function (dte) {
				return self._dom.wrapper[0];
			},
			_init: function () {
				if (self._ready) {
					return;
				}
				self._dom.content = $('div.DTED_Envelope_Container', self._dom.wrapper)[0];
				document.body.appendChild(self._dom.background);
				document.body.appendChild(self._dom.wrapper);
				self._dom.background.style.visibility = 'hidden';
				self._dom.background.style.display = 'block';
				self._cssBackgroundOpacity = $(self._dom.background).css('opacity');
				self._dom.background.style.display = 'none';
				self._dom.background.style.visibility = 'visible';
			},
			_show: function (callback) {
				var that = this, formHeight;
				if (!callback) {
					callback = function () {
					};
				}
				self._dom.content.style.height = 'auto';
				var style = self._dom.wrapper.style;
				style.opacity = 0;
				style.display = 'block';
				var targetRow = self._findAttachRow(), height = self._heightCalc(), width = targetRow.offsetWidth;
				style.display = 'none';
				style.opacity = 1;
				self._dom.wrapper.style.width = width + 'px';
				self._dom.wrapper.style.marginLeft = -(width / 2) + 'px';
				self._dom.wrapper.style.top = ($(targetRow).offset().top + targetRow.offsetHeight) + 'px';
				self._dom.content.style.top = ((-1 * height) - 20) + 'px';
				self._dom.background.style.opacity = 0;
				self._dom.background.style.display = 'block';
				$(self._dom.background).animate({opacity: self._cssBackgroundOpacity}, 'normal');
				$(self._dom.wrapper).fadeIn();
				if (self.conf.windowScroll) {
					$('html,body').animate({scrollTop: $(targetRow).offset().top + targetRow.offsetHeight - self.conf.windowPadding}, function () {
						$(self._dom.content).animate({top: 0}, 600, callback);
					});
				} else {
					$(self._dom.content).animate({top: 0}, 600, callback);
				}
				$(self._dom.close).bind('click.DTED_Envelope', function (e) {
					self._dte.close();
				});
				$(self._dom.background).bind('click.DTED_Envelope', function (e) {
					self._dte.background();
				});
				$('div.DTED_Lightbox_Content_Wrapper', self._dom.wrapper).bind('click.DTED_Envelope', function (e) {
					if ($(e.target).hasClass('DTED_Envelope_Content_Wrapper')) {
						self._dte.background();
					}
				});
				$(window).bind('resize.DTED_Envelope', function () {
					self._heightCalc();
				});
			},
			_heightCalc: function () {
				var formHeight = self.conf.heightCalc ? self.conf.heightCalc(self._dom.wrapper) : $(self._dom.content).children().height();
				var maxHeight = $(window).height() - (self.conf.windowPadding * 2) - $('div.DTE_Header', self._dom.wrapper).outerHeight() - $('div.DTE_Footer', self._dom.wrapper).outerHeight();
				$('div.DTE_Body_Content', self._dom.wrapper).css('maxHeight', maxHeight);
				return $(self._dte.dom.wrapper).outerHeight();
			},
			_hide: function (callback) {
				if (!callback) {
					callback = function () {
					};
				}
				$(self._dom.content).animate({top: -(self._dom.content.offsetHeight + 50)}, 600, function () {
					$([self._dom.wrapper, self._dom.background]).fadeOut('normal', callback);
				});
				$(self._dom.close).unbind('click.DTED_Lightbox');
				$(self._dom.background).unbind('click.DTED_Lightbox');
				$('div.DTED_Lightbox_Content_Wrapper', self._dom.wrapper).unbind('click.DTED_Lightbox');
				$(window).unbind('resize.DTED_Lightbox');
			},
			_findAttachRow: function () {
				var dt = $(self._dte.s.table).DataTable();
				if (self.conf.attach === 'head') {
					return dt.table().header();
				} else if (self._dte.s.action === 'create') {
					return dt.table().header();
				} else {
					return dt.row(self._dte.s.modifier).node();
				}
			},
			_dte: null,
			_ready: false,
			_cssBackgroundOpacity: 1,
			_dom: {
				wrapper: $('<div class="DTED DTED_Envelope_Wrapper"><div class="DTED_Envelope_Shadow"></div><div class="DTED_Envelope_Container"></div></div>')[0],
				background: $('<div class="DTED_Envelope_Background"><div/></div>')[0],
				close: $('<div class="DTED_Envelope_Close">&times;</div>')[0],
				content: null
			}
		});
		self = Editor.display.envelope;
		self.conf = {
			windowPadding: 50,
			heightCalc: null,
			attach: 'row',
			windowScroll: true
		};
	}(window, document, jQuery, jQuery.fn.dataTable));

	Editor.prototype.add = function (cfg, after) {
		if ($.isArray(cfg)) {
			for (var i = 0, iLen = cfg.length; i < iLen; i++) {
				this.add(cfg[i]);
			}
		} else {
			var name = cfg.name;
			if (name === undefined) {
				throw 'Error adding field. The field requires a `name` option';
			}
			if (this.s.fields[name]) {
				throw "Error adding field '" + name + '\'. A field already exists with this name';
			}
			this._dataSource('initField', cfg);
			this.s.fields[name] = new Editor.Field(cfg, this.classes.field, this);
			if (after === undefined) {
				this.s.order.push(name);
			} else if (after === null) {
				this.s.order.unshift(name);
			} else {
				var idx = $.inArray(after, this.s.order);
				this.s.order.splice(idx + 1, 0, name);
			}
		}
		this._displayReorder(this.order());
		return this;
	};
	Editor.prototype.background = function () {
		var onBackground = this.s.editOpts.onBackground;
		if (typeof onBackground === 'function') {
			onBackground(this);
		}
		else if (onBackground === 'blur') {
			this.blur();
		}
		else if (onBackground === 'close') {
			this.close();
		}
		else if (onBackground === 'submit') {
			this.submit();
		}
		return this;
	};
	Editor.prototype.blur = function () {
		this._blur();
		return this;
	};
	Editor.prototype.bubble = function (cells, fieldNames, show, opts) {
		var that = this;
		if (this._tidy(function () {
					that.bubble(cells, fieldNames, opts);
				})) {
			return this;
		}
		if ($.isPlainObject(fieldNames)) {
			opts = fieldNames;
			fieldNames = undefined;
			show = true;
		}
		else if (typeof fieldNames === 'boolean') {
			show = fieldNames;
			fieldNames = undefined;
			opts = undefined;
		}
		if ($.isPlainObject(show)) {
			opts = show;
			show = true;
		}
		if (show === undefined) {
			show = true;
		}
		opts = $.extend({}, this.s.formOptions.bubble, opts);
		var editFields = this._dataSource('individual', cells, fieldNames);
		this._edit(cells, editFields, 'bubble');
		var ret = this._preopen('bubble');
		if (!ret) {
			return this;
		}
		var namespace = this._formOptions(opts);
		$(window).on('resize.' + namespace, function () {
			that.bubblePosition();
		});
		var nodes = [];
		this.s.bubbleNodes = nodes.concat.apply(nodes, _pluck(editFields, 'attach'));
		var classes = this.classes.bubble,
				background = $('<div class="' + classes.bg + '"><div/></div>'),
				container = $('<div class="' + classes.wrapper + '">'
						+ '		<div class="' + classes.liner + '">'
						+ '			<div class="' + classes.table + '">'
						+ '				<div class="' + classes.close + '" />'
						+ '				<div class="DTE_Processing_Indicator"><span></div>'
						+ '			</div>'
						+ '		</div>'
						+ '		<div class="' + classes.pointer + '"/>'
						+ '</div>');
		if (show) {
			container.appendTo('body');
			background.appendTo('body');
		}
		var liner = container.children().eq(0), table = liner.children(), close = table.children();
		liner.append(this.dom.formError);
		table.prepend(this.dom.form);
		if (opts.message) {
			liner.prepend(this.dom.formInfo);
		}
		if (opts.title) {
			liner.prepend(this.dom.header);
		}
		if (opts.buttons) {
			table.append(this.dom.buttons);
		}
		var pair = $().add(container).add(background);
		this._closeReg(function (submitComplete) {
			pair.animate({opacity: 0}, function () {
				pair.detach();
				$(window).off('resize.' + namespace);
				that._clearDynamicInfo();
			});
		});
		background.click(function () {
			that.blur();
		});
		close.click(function () {
			that._close();
		});
		this.bubblePosition();
		pair.animate({opacity: 1});
		this._focus(this.s.includeFields, opts.focus);
		this._postopen('bubble');
		return this;
	};
	Editor.prototype.bubblePosition = function () {
		var wrapper = $('div.DTE_Bubble'),
				liner = $('div.DTE_Bubble_Liner'),
				nodes = this.s.bubbleNodes,
				position = {top: 0, left: 0, right: 0, bottom: 0};
		$.each(nodes, function (i, node) {
			var pos = $(node).offset();
			node = $(node).get(0);
			position.top += pos.top;
			position.left += pos.left;
			position.right += pos.left + node.offsetWidth;
			position.bottom += pos.top + node.offsetHeight;
		});
		position.top /= nodes.length;
		position.left /= nodes.length;
		position.right /= nodes.length;
		position.bottom /= nodes.length;
		var top = position.top,
				left = (position.left + position.right) / 2,
				width = liner.outerWidth(),
				visLeft = left - (width / 2),
				visRight = visLeft + width,
				docWidth = $(window).width(),
				padding = 15,
				classes = this.classes.bubble;
		wrapper.css({top: top, left: left});
		if (liner.length && liner.offset().top < 0) {
			wrapper.css('top', position.bottom).addClass('below');
		} else {
			wrapper.removeClass('below');
		}
		if (visRight + padding > docWidth) {
			var diff = visRight - docWidth;
			liner.css('left', visLeft < padding ? -(visLeft - padding) : -(diff + padding));
		}
		else {
			liner.css('left', visLeft < padding ? -(visLeft - padding) : 0);
		}
		return this;
	};
	Editor.prototype.buttons = function (buttons) {
		var that = this;
		if (buttons === '_basic') {
			buttons = [{
				label: this.i18n[this.s.action]['submit'],
				fn: function () {
					this.submit();
				}
			}];
		} else if (!$.isArray(buttons)) {
			buttons = [buttons];
		}
		$(this.dom.buttons).empty();
		$.each(buttons, function (i, btn) {
			if (typeof btn === 'string') {
				btn = {
					label: btn,
					fn: function () {
						this.submit();
					}
				};
			}
			$('<button/>', {'class': that.classes.form.button + (btn.className ? ' ' + btn.className : '')})
					.html(typeof btn.label === 'function' ? btn.label(that) : btn.label || '')
					.attr('tabindex', btn.tabIndex !== undefined ? btn.tabIndex : 0)
					.on('keyup', function (e) {
						if (e.keyCode === 13 && btn.fn) {
							btn.fn.call(that);
						}
					}).on('keypress', function (e) {
				if (e.keyCode === 13) {
					e.preventDefault();
				}
			}).on('click', function (e) {
				e.preventDefault();
				if (btn.fn) {
					btn.fn.call(that);
				}
			}).appendTo(that.dom.buttons);
		});
		return this;
	};
	Editor.prototype.clear = function (fieldName) {
		var I0g = "stro", that = this, fields = this[e6t.s3T][A5T];
		if (typeof fieldName === (H3A + M0A + K3A + m6A)) {
			fields[fieldName][(a7h + I0g + H3h)]();
			delete  fields[fieldName];
			var orderIdx = $[(B6g + I4 + a0)](fieldName, this[e6t.s3T][(S0A)]);
			this[e6t.s3T][S0A][(e6t.s3T + J4T + z4T + S3A)](orderIdx, 1);
		}
		else {
			$[B1A](this[(y3A + Z8T + e6t.n8 + h0T + e6t.P8 + D0g + L6h + e6t.s3T)](fieldName), function (i, name) {
				that[(r7A + n0T)](name);
			});
		}
		return this;
	};
	Editor.prototype.close = function () {
		this[(p2 + N8 + h0T + e6t.C0T + e6t.s3T + e6t.n8)](false);
		return this;
	};
	Editor.prototype.create = function (arg1, arg2, arg3, arg4) {
		var l0 = "maybeOpen", s1T = "dif", H5T = "rud", that = this, fields = this[e6t.s3T][A5T], count = 1;
		if (this[L7h](function () {
					var e4T = "reat";
					that[(N8 + e4T + e6t.n8)](arg1, arg2, arg3, arg4);
				})) {
			return this;
		}
		if (typeof arg1 === (H7T + O7h + u9h + J2T + K3A)) {
			count = arg1;
			arg1 = arg2;
			arg2 = arg3;
		}
		this[e6t.s3T][(e6t.n8 + e6t.P8 + M4g + K0 + Z8T + V4g + e6t.s3T)] = {};
		for (var i = 0; i < count; i++) {
			this[e6t.s3T][e2h][i] = {fields: this[e6t.s3T][A5T]};
		}
		var argOpts = this[(b0A + H5T + S + t2T)](arg1, arg2, arg3, arg4);
		this[e6t.s3T][(e6t.E0T + x3 + e6t.n8)] = 'main';
		this[e6t.s3T][L2h] = (r8A + e6t.X6 + e6t.v7T + e6t.n8);
		this[e6t.s3T][(e6t.E0T + e6t.C0T + s1T + Z8T + m5)] = null;
		this[I0h][V6g][l8h][K6h] = (Y5h);
		this[(v4A + N8 + U4T + i9T + z4A + e6t.X6 + N6)]();
		this[J2h](this[(S1 + x7T + N6T)]());
		$[(e6t.n8 + e6t.X6 + Z3A)](fields, function (name, field) {
					var R0h = "ulti";
					field[(e6t.E0T + R0h + L + f2 + Z5)]();
					field[Q3A](field[(e6t.P8 + v2)]());
				}
		);
		this[(d3A + X3A + e6t.F0T + e6t.v7T)]('initCreate');
		this[(v4A + e6t.s3T + v7 + e6t.E0T + M0 + a0A + B6g)]();
		this[(p2 + e6t.w5T + e6t.C0T + k3T + e6t.E0T + R3 + d7 + e6t.C0T + b2A)](argOpts[G5h]);
		argOpts[l0]();
		return this;
	};
	Editor.prototype.dependent = function (parent, url, opts) {
		var I7h = 'ST', F4A = 'PO', h3g = "depe";
		if ($[(a8T + k3T + e6t.X6 + H3h)](parent)) {
			for (var i = 0, ien = parent.length; i < ien; i++) {
				this[(h3g + e6t.F0T + e6t.P8 + D3h)](parent[i], url, opts);
			}
			return this;
		}
		var that = this, field = this[(l9g + l7T)](parent), ajaxOpts = {type: (F4A + I7h), dataType: (s3h + H3A + e6t.l7h + G7h)};
		opts = $[(e6t.h4 + e6t.v7T + j6T)]({event: (R1T + n4h + W + o4h + J2T), data: null, preUpdate: null, postUpdate: null}, opts);
		var update = function (json) {
			var p9g = "tUp", u8h = "stU", L4h = 'able', O1A = 'show', Y6 = 'dat', h9h = "preUpdate";
			if (opts[h9h]) {
				opts[h9h](json);
			}
			$[B1A]({labels: 'label', options: (F0g + Y6 + J2T), values: (d3T), messages: 'message', errors: 'error'}
					, function (jsonProp, fieldFn) {
						if (json[jsonProp]) {
							$[(e6t.n8 + m4h)](json[jsonProp], function (field, val) {
								that[(l9g + l7T)](field)[fieldFn](val);
							});
						}
					});
			$[(S0T + Z3A)](['hide', (O1A), (s9 + L4h), 'disable'], function (i, key) {
				if (json[key]) {
					that[key](json[key]);
				}
			});
			if (opts[(J4T + e6t.C0T + u8h + J4T + e6t.t6h + e6t.v7T + e6t.n8)]) {
				opts[(J4T + e6t.C0T + e6t.s3T + p9g + e6t.P8 + e6t.X6 + e6t.v7T + e6t.n8)](json);
			}
		};
		$(field[(e6t.F0T + e6t.C0T + e6t.P8 + e6t.n8)]())[i9T](opts[M6g], function (e) {
					var K6A = "sPlai", d8 = "rge";
					if ($(field[(e6t.F0T + e6t.C0T + a7h)]())[(Z5h + e6t.P8)](e[(W9T + d8 + e6t.v7T)]).length === 0) {
						return;
					}
					var data = {}
					;data[(k3T + o5)] = that[e6t.s3T][e2h] ? _pluck(that[e6t.s3T][e2h], (M1T + f3A)) : null;
					data[P3] = data[(k3T + T5 + e6t.s3T)] ? data[(P3 + e6t.s3T)][0] : null;
					data[(e0A + Q7A + f2)] = that[(A4h + e6t.X6 + h0T)]();
					if (opts.data) {
						var ret = opts.data(data);
						if (ret) {
							opts.data = ret;
						}
					}
					if (typeof url === (H2T + f4g + O8h + i3h + e6t.l7h + G7h)) {
						var o = url(field[(A4h + e6t.X6 + h0T)](), data, update);
						if (o) {
							update(o);
						}
					}
					else {
						if ($[(Z8T + K6A + e6t.F0T + R3 + e6t.u6 + a6T + e6t.n8 + T1h)](url)) {
							$[B6T](ajaxOpts, url);
						}
						else {
							ajaxOpts[(Z7T + y6A)] = url;
						}
						$[(H4A)]($[B6T](ajaxOpts, {url: url, data: data, success: update}
						));
					}
				}
		);
		return this;
	};
	Editor.prototype.destroy = function () {
		var j0g = "iq", Q3T = "destroy", x0 = "stroy";
		if (this[e6t.s3T][(R4h + e6t.s3T + u3h + t3 + e6t.P8)]) {
			this[(r7A + g6 + e6t.n8)]();
		}
		this[(r7A + e6t.n8 + e6t.X6 + k3T)]();
		var controller = this[e6t.s3T][(e6t.P8 + F4g + J4T + h0T + a0 + t3g + e6t.C0T + e6t.F0T + e6t.v7T + k3T + e6t.C0T + v0T + m5)];
		if (controller[(e6t.P8 + e6t.n8 + x0)]) {
			controller[Q3T](this);
		}
		$(document)[r3A]((o7 + M1T + M0A + J2T) + this[e6t.s3T][(Z7T + e6t.F0T + j0g + Z7T + e6t.n8)]);
		this[(e6t.P8 + e6t.C0T + e6t.E0T)] = null;
		this[e6t.s3T] = null;
	};
	Editor.prototype.disable = function (name) {
		var fields = this[e6t.s3T][(l9g + w3h)];
		$[B1A](this[(p2 + l9g + h0T + e6t.P8 + D0g + e6t.E0T + e6t.n8 + e6t.s3T)](name), function (i, n) {
					fields[n][(R4h + e6t.s3T + b4T + e6t.n8)]();
				}
		);
		return this;
	};
	Editor.prototype.display = function (show) {
		if (show === undefined) {
			return this[e6t.s3T][(R4h + e6t.s3T + u3h + t3 + e6t.P8)];
		}
		return this[show ? (e6t.l7h + h1h + G7h) : 'close']();
	};
	Editor.prototype.displayed = function () {
		return $[(h)](this[e6t.s3T][(S1 + x7T + N6T)], function (field, name) {
					return field[u1h]() ? name : null;
				}
		);
	};
	Editor.prototype.displayNode = function () {
		return this[e6t.s3T][K8h][(U1A + a7h)](this);
	};
	Editor.prototype.edit = function (items, arg1, arg2, arg3, arg4) {
		var that = this;
		if (this._tidy(function () {
					that.edit(items, arg1, arg2, arg3, arg4);
				})) {
			return this;
		}
		var fields = this.s.fields, argOpts = this._crudArgs(arg1, arg2, arg3, arg4);
		this._edit(items, this._dataSource('fields', items), 'main');
		this._assembleMain();
		this._formOptions(argOpts.opts);
		argOpts.maybeOpen();
		return this;
	};
	Editor.prototype.enable = function (name) {
		var fields = this[e6t.s3T][A5T];
		$[(B1A)](this[(p2 + S1 + x7T + j3A + f2)](name), function (i, n) {
					fields[n][(e6t.n8 + e6t.F0T + e6t.X6 + M0)]();
				}
		);
		return this;
	};
	Editor.prototype.error = function (name, msg) {
		if (msg === undefined) {
			this._message(this.dom.formError, name);
		} else {
			this.s.fields[name].error(msg);
		}
		return this;
	};
	Editor.prototype.field = function (name) {
		return this.s.fields[name];
	};
	Editor.prototype.fields = function () {
		return $.map(this.s.fields, function (field, name) {
			return name;
		});
	};
	Editor.prototype.file = _api_file;
	Editor.prototype.files = _api_files;
	Editor.prototype.get = function (name) {
		var q3T = "sArray", fields = this[e6t.s3T][A5T];
		if (!name) {
			name = this[A5T]();
		}
		if ($[(Z8T + q3T)](name)) {
			var out = {}
			;$[(B1A)](name, function (i, n) {
						out[n] = fields[n][b4]();
					}
			);
			return out;
		}
		return fields[name][(b4)]();
	};
	Editor.prototype.hide = function (names, animate) {
		var fields = this[e6t.s3T][(e6t.w5T + Z8T + e6t.n8 + l7T + e6t.s3T)];
		$[(S0T + N8 + T8T)](this[(p2 + w6T + y7 + e6t.X6 + e6t.E0T + f2)](names), function (i, n) {
					fields[n][(t1)](animate);
				}
		);
		return this;
	};
	Editor.prototype.inError = function (inNames) {
		var h0 = "nErr", h3h = "_fieldNames", d7A = 'ibl', a6A = "formError";
		if ($(this[I0h][a6A])[(F4g)]((F4 + Y4A + i3h + H3A + d7A + J2T))) {
			return true;
		}
		var fields = this[e6t.s3T][A5T], names = this[h3h](inNames);
		for (var i = 0, ien = names.length; i < ien; i++) {
			if (fields[names[i]][(Z8T + h0 + f8)]()) {
				return true;
			}
		}
		return false;
	};
	Editor.prototype.inline = function (cell, fieldName, opts) {
		var y7h = 'inlin', p8 = "ocu", q4 = "eReg", T1T = "mErro", N3h = "ace", c3 = 'In', t2h = 'cessi', k8A = "app", v4 = 'nli', r5T = "idy", P1T = 'Fi', p3 = 'TE_', i0T = "Sour", J5h = "ine",
				M5A = "ions", Z0T = "Object", that = this;
		if ($[(Z8T + b8A + s5h + Z0T)](fieldName)) {
			opts = fieldName;
			fieldName = undefined;
		}
		opts = $[(e6t.h4 + e6t.v7T + e6t.n8 + e6t.F0T + e6t.P8)]({}
				, this[e6t.s3T][(e6t.w5T + e6t.C0T + x8A + P9 + e6t.v7T + M5A)][(B6g + h0T + J5h)], opts);
		var editFields = this[(p2 + e6t.P8 + e6t.X6 + e6t.v7T + e6t.X6 + i0T + N8 + e6t.n8)]('individual', cell, fieldName), node, field, countOuter = 0, countInner, closed = false,
				classes = this[(Q7T + e6t.s3T + e6t.s3T + e6t.n8 + e6t.s3T)][(Z8T + e6t.F0T + S6A)];
		$[(S0T + N8 + T8T)](editFields, function (i, editField) {
					var B0A = "displayFields", W3h = "attach", d6T = 'nn';
					if (countOuter > 0) {
						throw (R8 + E1T + d6T + e6t.l7h + M0A + I9g + J2T + b1h + M0A + I9g + O7h + e6t.l7h + K3A + J2T + I9g + M0A + i9A + I9g + e6t.l7h + G7h + J2T + I9g + K3A + e6t.l7h + j0A + I9g + i3h + G7h + J3h + i3h + C6 + I9g + E1T + M0A + I9g + E1T + I9g + M0A + i3h + F6);
					}
					node = $(editField[W3h][0]);
					countInner = 0;
					$[B1A](editField[B0A], function (j, f) {
								if (countInner > 0) {
									throw (R8 + W + G7h + e6t.l7h + M0A + I9g + J2T + M1T + i3h + M0A + I9g + O7h + e6t.l7h + H6 + I9g + M0A + i9A + I9g + e6t.l7h + C6 + I9g + H2T + i3h + G4 + M1T + I9g + i3h + r0T + i3h + C6 + I9g + E1T + M0A + I9g + E1T + I9g + M0A + i3h + F6);
								}
								field = f;
								countInner++;
							}
					);
					countOuter++;
				}
		);
		if ($((M1T + z0 + o7 + C8 + p3 + P1T + G4 + M1T), node).length) {
			return this;
		}
		if (this[(p2 + e6t.v7T + r5T)](function () {
							var g6g = "inline";
							that[g6g](cell, fieldName, opts);
						}
				)) {
			return this;
		}
		this[(O8T + e6t.v7T)](cell, editFields, (i3h + v4 + C6));
		var namespace = this[(p2 + T6 + k3T + e6t.E0T + P9 + v4g + b2A)](opts), ret = this[(p2 + F1h + e6t.C0T + k6A)]((b7 + s7g + C6));
		if (!ret) {
			return this;
		}
		var children = node[(N8 + e6t.C0T + e6t.F0T + v5A + e6t.v7T + e6t.s3T)]()[(a7h + e6t.v7T + x2 + T8T)]();
		node[(k8A + e6t.n8 + N4g)]($((V4 + M1T + z0 + I9g + R1T + Q1 + H3A + c9g) + classes[R2h] + '">' + '<div class="' + classes[(z4T + K4g + k3T)] + (Q9) + (V4 + M1T + i3h + Y4A + I9g + R1T + O1h + O0h + c9g + C8 + G3T + Z3 + s4T + K3A + e6t.l7h + t2h + G7h + o4h + H9h + c3 + M1T + i3h + R1T + I7 + e6h + x6A + H3A + G5A + i1A + M1T + i3h + Y4A + J5) + (q8g + M1T + z0 + J5) + '<div class="' + classes[(s5A + e6t.v7T + e6t.v7T + e6t.C0T + e6t.F0T + e6t.s3T)] + (z4h) + '</div>'));
		node[(e6t.w5T + Z8T + N4g)]((M1T + i3h + Y4A + o7) + classes[(z4T + e6t.F0T + e6t.n8 + k3T)][(Y2A + J4T + h0T + N3h)](/ /g, '.'))[W5A](field[(U1A + a7h)]())[(l9 + L3T + N4g)](this[(e6t.P8 + e6t.C0T + e6t.E0T)][(e6t.w5T + f8 + T1T + k3T)]);
		if (opts[(e6t.u6 + Z7T + I2T + i9T + e6t.s3T)]) {
			node[T4g]((D1T + o7) + classes[V2][q6g](/ /g, '.'))[(l3g + e6t.P8)](this[I0h][(B9g + u2h)]);
		}
		this[(p2 + r7A + g6 + q4)](function (submitComplete) {
					var p7A = "icInfo", U3g = "ynam", j5T = "lea", j0T = "nte";
					closed = true;
					$(document)[(r3A)]((f0A + X6g) + namespace);
					if (!submitComplete) {
						node[(N8 + e6t.C0T + j0T + e6t.I2A + e6t.s3T)]()[(W2 + m4h)]();
						node[(r3 + e6t.F0T + e6t.P8)](children);
					}
					that[(b0A + j5T + z5h + U3g + p7A)]();
				}
		);
		setTimeout(function () {
					if (closed) {
						return;
					}
					$(document)[(i9T)]('click' + namespace, function (e) {
								var x = "rents", K8A = "typ", j7g = 'lf', E8T = 'ndSe', E9A = 'dd', back = $[(e6t.w5T + e6t.F0T)][N1] ? (E1T + E9A + k6 + E1T + X6g) : (E1T + E8T + j7g);
								if (!field[(p2 + K8A + S9T)]('owns', e[(e6t.v7T + U9 + b5T + Z5)]) && $[(G4A + y2h + H3h)](node[0], $(e[(e6t.v7T + e6t.X6 + k3T + m7 + e6t.v7T)])[(M5T + x)]()[back]()) === -1) {
									that[(e6t.u6 + h0T + P5h)]();
								}
							}
					);
				}
				, 0);
		this[M3T]([field], opts[(e6t.w5T + p8 + e6t.s3T)]);
		this[a4A]((y7h + J2T));
		return this;
	};
	Editor.prototype.message = function (name, msg) {
		var p7h = "ssage";
		if (msg === undefined) {
			this[(p2 + e6t.E0T + e6t.n8 + p7h)](this[I0h][D6A], name);
		}
		else {
			this[e6t.s3T][A5T][name][(e6t.E0T + o6T + e6t.X6 + b5T + e6t.n8)](msg);
		}
		return this;
	};
	Editor.prototype.mode = function () {
		return this[e6t.s3T][(r6h + X0g + e6t.F0T)];
	};
	Editor.prototype.modifier = function () {
		return this[e6t.s3T][(e6t.E0T + e6t.C0T + e6t.P8 + Z8T + S1 + m5)];
	};
	Editor.prototype.multiGet = function (fieldNames) {
		var fields = this[e6t.s3T][(w6T + e6t.s3T)];
		if (fieldNames === undefined) {
			fieldNames = this[(w6T + e6t.s3T)]();
		}
		if ($[(a8T + k3T + a0)](fieldNames)) {
			var out = {}
			;$[B1A](fieldNames, function (i, name) {
						var D8 = "tiG";
						out[name] = fields[name][(v3g + h0T + D8 + Z5)]();
					}
			);
			return out;
		}
		return fields[fieldNames][(e6t.E0T + Z7T + h0T + e6t.v7T + Z8T + J9T)]();
	};
	Editor.prototype.multiSet = function (fieldNames, val) {
		var fields = this[e6t.s3T][(S1 + V4g + e6t.s3T)];
		if ($[q2h](fieldNames) && val === undefined) {
			$[(e6t.n8 + x2 + T8T)](fieldNames, function (name, value) {
						fields[name][T9A](value);
					}
			);
		}
		else {
			fields[fieldNames][T9A](val);
		}
		return this;
	};
	Editor.prototype.node = function (name) {
		var n1T = "rder", fields = this[e6t.s3T][A5T];
		if (!name) {
			name = this[(e6t.C0T + n1T)]();
		}
		return $[(Z8T + O9A + o9g + H3h)](name) ? $[h](name, function (n) {
					return fields[n][(U1A + e6t.P8 + e6t.n8)]();
				}
		) : fields[name][(e6t.F0T + x3 + e6t.n8)]();
	};
	Editor.prototype.off = function (name, fn) {
		$(this)[(e7 + e6t.w5T)](this[P3A](name), fn);
		return this;
	};
	Editor.prototype.on = function (name, fn) {
		var x0T = "eventN";
		$(this)[i9T](this[(p2 + x0T + e6t.X6 + L6h)](name), fn);
		return this;
	};
	Editor.prototype.one = function (name, fn) {
		$(this)[(e6t.C0T + K4g)](this[P3A](name), fn);
		return this;
	};
	Editor.prototype.open = function () {
		var I1T = "osto", v8 = "eo", Y2 = "yR", that = this;
		this[(U0A + Z8T + z8 + h0T + e6t.X6 + Y2 + v8 + k3T + e6t.P8 + m5)]();
		this[(p2 + N8 + z3A + e6t.n8 + L + e6t.n8 + b5T)](function (submitComplete) {
					that[e6t.s3T][K8h][R6T](that, function () {
								that[(p2 + N8 + h0T + e6t.n8 + e6t.X6 + z5h + H3h + e6t.F0T + e6t.X6 + S0h + N8 + H2A + e6t.w5T + e6t.C0T)]();
							}
					);
				}
		);
		var ret = this[(p2 + F1h + o9T + e6t.n8 + e6t.F0T)]('main');
		if (!ret) {
			return this;
		}
		this[e6t.s3T][K8h][t2A](this, this[(I0h)][(M4h + o9g + J4T + J4T + e6t.n8 + k3T)]);
		this[M3T]($[h](this[e6t.s3T][(e6t.C0T + k3T + I6)], function (name) {
					return that[e6t.s3T][(p9T + N6T)][name];
				}
		), this[e6t.s3T][Z2][(e6t.w5T + j9 + Z7T + e6t.s3T)]);
		this[(V0h + I1T + L3T + e6t.F0T)]((O7h + E1T + i3h + G7h));
		return this;
	};
	Editor.prototype.order = function (set) {
		var g4A = "All", e0g = "ort", f0 = "sli", N1T = "slice", i2A = "rd";
		if (!set) {
			return this[e6t.s3T][(e6t.C0T + i2A + m5)];
		}
		if (arguments.length && !$[(Z8T + e6t.s3T + N3g + k3T + H4)](set)) {
			set = Array.prototype.slice.call(arguments);
		}
		if (this[e6t.s3T][S0A][N1T]()[(e6t.s3T + e6t.C0T + k3T + e6t.v7T)]()[(t8 + B6g)]('-') !== set[(f0 + N8 + e6t.n8)]()[(e6t.s3T + e0g)]()[j3T]('-')) {
			throw (g4A + L9A + e6t.w5T + Z8T + V4g + e6t.s3T + P2A + e6t.X6 + e6t.F0T + e6t.P8 + L9A + e6t.F0T + e6t.C0T + L9A + e6t.X6 + e6t.P8 + R4h + e6t.v7T + Z8T + i9T + e6t.X6 + h0T + L9A + e6t.w5T + b8h + e6t.s3T + P2A + e6t.E0T + l9T + L9A + e6t.u6 + e6t.n8 + L9A + J4T + k3T + e6t.C0T + A4h + Z8T + e6t.P8 + e6t.n8 + e6t.P8 + L9A + e6t.w5T + e6t.C0T + k3T + L9A + e6t.C0T + i2A + e6t.n8 + f5A + h5A + t6A);
		}
		$[(e6t.n8 + p5 + e6t.n8 + e6t.F0T + e6t.P8)](this[e6t.s3T][S0A], set);
		this[J2h]();
		return this;
	};
	Editor.prototype.remove = function (items, arg1, arg2, arg3, arg4) {
		var that = this;
		if (this._tidy(function () {
					that.remove(items, arg1, arg2, arg3, arg4);
				})) {
			return this;
		}
		if (items.length === undefined) {
			items = [items];
		}
		var argOpts = this._crudArgs(arg1, arg2, arg3, arg4), editFields = this._dataSource('fields', items);
		this.s.action = 'remove';
		this.s.modifier = items;
		this.s.editFields = editFields;
		this.dom.form.style.display = 'none';
		this._actionClass();
		this._event('initRemove', [_pluck(editFields, 'node'), _pluck(editFields, 'data'), items]);
		this._event('initMultiRemove', [editFields, items]);
		this._assembleMain();
		this._formOptions(argOpts.opts);
		argOpts.maybeOpen();
		var opts = this.s.editOpts;
		if (opts.focus !== null) {
			$('button', this.dom.buttons).eq(opts.focus).focus();
		}
		return this;
	};
	Editor.prototype.set = function (set, val) {
		var fields = this[e6t.s3T][(S1 + x7T + e6t.P8 + e6t.s3T)];
		if (!$[q2h](set)) {
			var o = {}
			;o[set] = val;
			set = o;
		}
		$[B1A](set, function (n, v) {
					fields[n][(v7 + e6t.v7T)](v);
				}
		);
		return this;
	};
	Editor.prototype.show = function (names, animate) {
		var fields = this[e6t.s3T][(S1 + x7T + e6t.P8 + e6t.s3T)];
		$[(e6t.n8 + e6t.X6 + N8 + T8T)](this[(p2 + e6t.w5T + Z8T + x7T + j3A + f2)](names), function (i, n) {
					var P1A = "show";
					fields[n][(P1A)](animate);
				}
		);
		return this;
	};
	Editor.prototype.submit = function (successCallback, errorCallback, formatdata, hide) {
		var that = this, fields = this.s.fields, errorFields = [], errorReady = 0, sent = false;
		if (this.s.processing || !this.s.action) {
			return this;
		}
		this._processing(true);
		var send = function () {
			if (errorFields.length !== errorReady || sent) {
				return;
			}
			sent = true;
			that._submit(successCallback, errorCallback, formatdata, hide);
		};
		this.error();
		$.each(fields, function (name, field) {
			if (field.inError()) {
				errorFields.push(name);
			}
		});
		$.each(errorFields, function (i, name) {
			fields[name].error('', function () {
				errorReady++;
				send();
			});
		});
		send();
		return this;
	};
	Editor.prototype.template = function (set) {
		var O4T = "empl";
		if (set === undefined) {
			return this[e6t.s3T][S8];
		}
		this[e6t.s3T][(e6t.v7T + O4T + Y5)] = $(set);
		return this;
	};
	Editor.prototype.title = function (title) {
		var A4g = "tabl", p0 = "lasses", header = $(this[(I0h)][(T8T + S0T + I6)])[P0g]((M1T + z0 + o7) + this[(N8 + p0)][(T8T + p3h + m5)][(V9A + e6t.I2A + e6t.n8 + e6t.F0T + e6t.v7T)]);
		if (title === undefined) {
			return header[e3T]();
		}
		if (typeof title === 'function') {
			title = title(this, new DataTable[(N3g + M0T)](this[e6t.s3T][(A4g + e6t.n8)]));
		}
		header[(T8T + A6T + h0T)](title);
		return this;
	};
	Editor.prototype.val = function (field, value) {
		if (value !== undefined || $[q2h](field)) {
			return this[Q3A](field, value);
		}
		return this[(m7 + e6t.v7T)](field);
	};
	Editor.prototype._constructor = function (init) {
		var i0h = "yCon", D7g = "uniq", B7T = "unique", L7A = 'nit', n0 = 'ontent', D5T = "formContent", m4 = "wrapp", E3 = "ev", F2h = 'eat', j7 = "UTTONS", o0 = "ols", b8 = "Tabl", Q4T = 'ns',
				f4h = "ader", x0g = "hea", f3h = 'ead', O2 = "info", E6 = 'nf', N7A = 'rm_', B1T = 'err', R7g = "tag", G3A = "footer", q4g = '_c', a7T = 'essin', D3A = "qu", o3A = "legacyAjax",
				d0g = "mOp", J9A = "dataSources", J2A = "ataTab", C5A = "taS", l2h = "dS", B3T = "xUrl";
		init = $.extend(true, {}, Editor.defaults, init);
		this.s = $.extend(true, {}, Editor.models.settings, {
			table: init.domTable || init.table,
			dbTable: init.dbTable || null,
			ajaxUrl: init.ajaxUrl,
			ajax: init.ajax,
			idSrc: init.idSrc,
			dataSource: init.domTable || init.table ? Editor.dataSources.dataTable : Editor.dataSources.html,
			formOptions: init.formOptions,
			legacyAjax: init.legacyAjax,
			template: init.template ? $(init.template).detach() : null
		});
		this.classes = $.extend(true, {}, Editor.classes);
		this.i18n = init.i18n;
		Editor.models.settings.unique++;
		var that = this, classes = this.classes;
		this.dom = {
			wrapper: $('<div class="' + classes.wrapper + '"><div data-dte-e="processing" class="' + classes.processing.indicator + '"><span/></div>'
					+ '<div data-dte-e="body" class="' + classes.body.wrapper + '"><div data-dte-e="body_content" class="' + classes.body.content + '"/>' + '</div>'
					+ '<div data-dte-e="foot" class="' + classes.footer.wrapper + '">' + '<div class="' + classes.footer.content + '"/></div>' + '</div>')[0],

			form: $('<form data-dte-e="form" class="' + classes.form.tag + '"><div data-dte-e="form_content" class="' + classes.form.content + '"/></form>')[0],
			formError: $('<div data-dte-e="form_error" class="' + classes.form.error + '"/>')[0],
			formInfo: $('<div data-dte-e="form_info" class="' + classes.form.info + '"/>')[0],
			header: $('<div data-dte-e="head" class="' + classes.header.wrapper + '"><div class="' + classes.header.content + '"/></div>')[0],
			buttons: $('<div data-dte-e="form_buttons" class="' + classes.form.buttons + '"/>')[0]
		};
		if ($.fn.dataTable.TableTools) {
			var ttButtons = $.fn.dataTable.TableTools.BUTTONS, i18n = this.i18n;
			$.each(['create', 'edit', 'remove'], function (i, val) {
				ttButtons['editor_' + val].sButtonText = i18n[val]['button'];
			});
		}
		$.each(init.events, function (evt, fn) {
			that.on(evt, function () {
				var args = Array.prototype.slice.call(arguments);
				args.shift();
				fn.apply(that, args);
			});
		});
		var dom = this.dom, wrapper = dom.wrapper;
		dom.formContent = _editor_el('form_content', dom.form)[0];
		dom.footer = _editor_el('foot', wrapper)[0];
		dom.body = _editor_el('body', wrapper)[0];
		dom.bodyContent = _editor_el('body_content', wrapper)[0];
		dom.processing = _editor_el('processing', wrapper)[0];
		if (init.fields) {
			this.add(init.fields);
		}
		$(document).on('init.dt.dte' + this.s.unique, function (e, settings, json) {
			if (that.s.table && settings.nTable === $(that.s.table).get(0)) {
				settings._editor = that;
			}
		}).on('xhr.dt.dte' + this.s.unique, function (e, settings, json) {
			if (json && that.s.table && settings.nTable === $(that.s.table).get(0)) {
				that._optionsUpdate(json);
			}
		});
		this.s.displayController = Editor.display[init['display']].init(this);
		this._event('initComplete', []);
	};
	Editor.prototype._actionClass = function () {
		var classesActions = this.classes.actions, action = this.s.action, wrapper = $(this.dom.wrapper);
		wrapper.removeClass([classesActions.create, classesActions.edit, classesActions.remove].join(' '));
		if (action === 'create') {
			wrapper.addClass(classesActions.create);
		} else if (action === 'edit') {
			wrapper.addClass(classesActions.edit);
		} else if (action === 'remove') {
			wrapper.addClass(classesActions.remove);
		}
	};
	Editor.prototype._ajax = function (data, success, error) {
		var D7 = "exOf", Q9T = "leteBod", x6h = "eB", g5 = "delet", f6T = 'ELETE', P6T = "sFunc", o8A = "isFunction", w2h = "success", r4h = "uc", i0A = "cc", w8h = "url", B1 = "Of", k6h = "inde",
				v8T = "ajaxUrl", Q = "unc", Y8h = "isF", C6T = 'idSrc', y8A = "tFie", a5A = "axU", c4h = 'OST', thrown, opts = {
					type: (s4T + c4h),
					dataType: (s3h + H3A + e6t.l7h + G7h),
					data: null,
					error: [function (xhr, text, err) {
						thrown = err;
					}],
					complete: [function (xhr, text) {
						var W7h = "status";
						var r2h = "nO";
						var t4T = "Pl";
						var H2 = "resp";
						var O4h = "eJ";
						var r6 = "pars";
						var H8T = "JSO";
						var H4T = "spons";
						var M6 = "responseJSON";
						var U7g = "tus";
						var json = null;
						if (xhr[(O8 + e6t.X6 + U7g)] === 204) {
							json = {};
						} else {
							try {
								json = xhr[M6] ? xhr[(Y2A + H4T + e6t.n8 + H8T + y7)] : $[(r6 + O4h + i9 + R3 + y7)](xhr[(H2 + i9T + e6t.s3T + e6t.n8 + V4h + J4h + e6t.v7T)]);
							}
							catch (e) {
							}
						}
						if ($[(F4g + t4T + e6t.X6 + Z8T + r2h + b2h + N8 + e6t.v7T)](json) || $[(Z8T + e6t.s3T + S + H4)](json)) {
							success(json, xhr[W7h] >= 400);
						} else {
							error(xhr, text, thrown);
						}
					}]
				}, a, action = this[e6t.s3T][(e6t.X6 + N8 + e6t.v7T + Z8T + e6t.C0T + e6t.F0T)], ajaxSrc = this[e6t.s3T][(M9T + c4)] || this[e6t.s3T][(e6t.X6 + a6T + a5A + y6A)],
				id = action === 'edit' || action === 'remove' ? _pluck(this[e6t.s3T][(L2 + Z8T + y8A + w3h)], (C6T)) : null;
		if ($[(Z8T + e6t.s3T + S + o9g + H3h)](id)) {
			id = id[(a6T + e6t.C0T + B6g)](',');
		}
		if ($[(Z8T + b8A + e6t.X6 + Z8T + e6t.F0T + f7T + g5A + T1h)](ajaxSrc) && ajaxSrc[action]) {
			ajaxSrc = ajaxSrc[action];
		}
		if ($[(Y8h + Q + U4T + i9T)](ajaxSrc)) {
			var uri = null, method = null;
			if (this[e6t.s3T][(M9T + d5h)]) {
				var url = this[e6t.s3T][v8T];
				if (url[(N8 + Y2A + V7 + e6t.n8)]) {
					uri = url[action];
				}
				if (uri[z5T](' ') !== -1) {
					a = uri[(e6t.s3T + J4T + z4T + e6t.v7T)](' ');
					method = a[0];
					uri = a[1];
				}
				uri = uri[(k3T + e6t.n8 + O3h + e6t.X6 + S3A)](/_id_/, id);
			}
			ajaxSrc(method, uri, data, success, error);
			return;
		} else if (typeof ajaxSrc === (F0h + V9T + G7h + o4h)) {
			if (ajaxSrc[(k6h + J4h + B1)](' ') !== -1) {
				a = ajaxSrc[(o4g + Z8T + e6t.v7T)](' ');
				opts[(Q9h + L3T)] = a[0];
				opts[(Z7T + y6A)] = a[1];
			} else {
				opts[w8h] = ajaxSrc;
			}
		} else {
			var optsCopy = $[(e6t.h4 + e6t.v7T + j6T)]({}, ajaxSrc || {});
			if (optsCopy[(E5 + i0A + o6T)]) {
				opts[(e6t.s3T + r4h + N8 + e6t.n8 + e6t.s3T + e6t.s3T)][(J4T + Z7T + e6t.s3T + T8T)](optsCopy[w2h]);
				delete  optsCopy[(e6t.s3T + Z7T + N8 + N8 + e6t.n8 + N6)];
			}
			if (optsCopy.error) {
				opts.error[G3h](optsCopy.error);
				delete  optsCopy.error;
			}
			opts = $[(e6t.h4 + e6t.v7T + p6 + e6t.P8)]({}, opts, optsCopy);
		}
		opts[(w8h)] = opts[(Z7T + y6A)][q6g](/_id_/, id);
		if (opts.data) {
			var newData = $[o8A](opts.data) ? opts.data(data) : opts.data;
			data = $[(Z8T + P6T + e6t.v7T + Z8T + e6t.C0T + e6t.F0T)](opts.data) && newData ? newData : $[B6T](true, data, newData);
		}
		opts.data = data;
		if (opts[(a9A)] === (C8 + f6T) && (opts[(g5 + x6h + e6t.C0T + c8T)] === undefined || opts[(e6t.P8 + e6t.n8 + Q9T + H3h)] === true)) {
			var params = $[(M5T + k3T + e6t.X6 + e6t.E0T)](opts.data);
			opts[w8h] += opts[(Z7T + y6A)][(B6g + e6t.P8 + D7)]('?') === -1 ? '?' + params : '&' + params;
			delete  opts.data;
		}
		$[(e6t.X6 + M7h)](opts);
	};
	Editor.prototype._assembleMain = function () {
		var dom = this.dom;
		$(dom.wrapper).prepend(dom.header);
		$(dom.footer).append(dom.formError).append(dom.buttons);
		$(dom.bodyContent).append(dom.formInfo).append(dom.form);
	};
	Editor.prototype._blur = function () {
		var W5h = 'eB', opts = this[e6t.s3T][Z2], onBlur = opts[g3];
		if (this[z5]((q4A + K3A + W5h + J3h + L0A + K3A)) === false) {
			return;
		}
		if (typeof onBlur === (H2T + f4g + R1T + o7A + e6t.l7h + G7h)) {
			onBlur(this);
		}
		else if (onBlur === 'submit') {
			this[P8g]();
		}
		else if (onBlur === (R1T + F8)) {
			this[(p2 + N8 + h0T + e6t.C0T + e6t.s3T + e6t.n8)]();
		}
	};
	Editor.prototype._clearDynamicInfo = function () {
		if (!this[e6t.s3T]) {
			return;
		}
		var errorClass = this[F2][(e6t.w5T + Z8T + e6t.n8 + h0T + e6t.P8)].error, fields = this[e6t.s3T][(e6t.w5T + Z8T + x7T + N6T)];
		$((M1T + i3h + Y4A + o7) + errorClass, this[(A9h + e6t.E0T)][(M4h + o9g + J4T + J4T + e6t.n8 + k3T)])[G](errorClass);
		$[(e6t.n8 + m4h)](fields, function (name, field) {
					var J1h = "sag", h7 = "mes";
					field.error('')[(h7 + J1h + e6t.n8)]('');
				}
		);
		this.error('')[(e6t.E0T + e6t.n8 + N6 + S4)]('');
	};
	Editor.prototype._close = function (submitComplete) {
		var p4h = "clo", c6g = "eIcb", k6g = "closeCb";
		if (this[z5]((q4A + K3A + J2T + o4A + k2T)) === false) {
			return;
		}
		if (this[e6t.s3T][(N8 + h0T + e6t.C0T + v7 + t3g + e6t.u6)]) {
			this[e6t.s3T][k6g](submitComplete);
			this[e6t.s3T][(N8 + h0T + e6t.C0T + e6t.s3T + e6t.n8 + t3g + e6t.u6)] = null;
		}
		if (this[e6t.s3T][n5A]) {
			this[e6t.s3T][(r7A + g6 + c6g)]();
			this[e6t.s3T][(p4h + H7A + e6t.u6)] = null;
		}
		$('body')[(e6t.C0T + C2)]('focus.editor-focus');
		this[e6t.s3T][(h9 + J4T + X3h + H3h + e6t.n8 + e6t.P8)] = false;
		this[(d3A + A4h + p6 + e6t.v7T)]('close');
	};
	Editor.prototype._closeReg = function (fn) {
		var u2A = "seC";
		this[e6t.s3T][(r7A + e6t.C0T + u2A + e6t.u6)] = fn;
	};
	Editor.prototype._crudArgs = function (arg1, arg2, arg3, arg4) {
		var that = this, title, buttons, show, opts;
		if ($.isPlainObject(arg1)) {
			opts = arg1;
		} else if (typeof arg1 === 'boolean') {
			show = arg1;
			opts = arg2;
		} else {
			title = arg1;
			buttons = arg2;
			show = arg3;
			opts = arg4;
		}
		if (show === undefined) {
			show = true;
		}
		if (title) {
			that.title(title);
		}
		if (buttons) {
			that.buttons(buttons);
		}
		return {
			opts: $.extend({}, this.s.formOptions.main, opts),
			maybeOpen: function () {
				if (show) {
					that.open();
				}
			}
		};
	};
	Editor.prototype._dataSource = function (name) {
		var m2 = "ift", args = Array.prototype.slice.call(arguments);
		args[(e6t.s3T + T8T + m2)]();
		var fn = this[e6t.s3T][(e6t.P8 + e6t.X6 + e6t.v7T + q4T + x5h + S3A)][name];
		if (fn) {
			return fn[(r7g + H3h)](this, args);
		}
	};
	Editor.prototype._displayReorder = function (includeFields) {
		var v9A = 'de', C2h = 'layO', G6g = "includeFields", Q4h = "ude", I5h = "inc", q5A = "ields", Z6g = "mCo", that = this,
				formContent = $(this[(A9h + e6t.E0T)][(T6 + k3T + Z6g + e6t.F0T + e6t.v7T + p6 + e6t.v7T)]), fields = this[e6t.s3T][(e6t.w5T + q5A)], order = this[e6t.s3T][S0A],
				template = this[e6t.s3T][(p3T + e6t.E0T + J4T + h0T + Y5)], mode = this[e6t.s3T][X9A] || 'main';
		if (includeFields) {
			this[e6t.s3T][(I5h + h0T + Q4h + K0 + b8h + e6t.s3T)] = includeFields;
		}
		else {
			includeFields = this[e6t.s3T][G6g];
		}
		formContent[P0g]()[(a7h + e6t.v7T + m4h)]();
		$[(e6t.n8 + m4h)](order, function (i, fieldOrName) {
					var k4T = "after", P9T = 'ie', o3 = 'edito', S9h = "_weakInArray", name = fieldOrName instanceof Editor[(K0 + Z8T + x7T + e6t.P8)] ? fieldOrName[(g1T + e6t.n8)]() : fieldOrName;
					if (that[S9h](name, includeFields) !== -1) {
						if (template && mode === 'main') {
							template[(S1 + e6t.F0T + e6t.P8)]((o3 + K3A + C7 + H2T + P9T + J3h + M1T + j8T + G7h + p9h + c9g) + name + '"]')[k4T](fields[name][n6g]());
							template[T4g]('[data-editor-template="' + name + '"]')[W5A](fields[name][(n6g)]());
						}
						else {
							formContent[(r3 + N4g)](fields[name][n6g]());
						}
					}
				}
		);
		if (template && mode === (N4)) {
			template[i2h](formContent);
		}
		this[(p2 + e6t.n8 + B6A)]((M1T + x4T + C2h + K3A + v9A + K3A), [this[e6t.s3T][u1h], this[e6t.s3T][(e6t.X6 + q3h + i9T)], formContent]);
	};
	Editor.prototype._edit = function (items, editFields, type) {
		var that = this, fields = this.s.fields,
				usedFields = [], includeInOrder, editData = {};
		this.s.editFields = editFields;
		this.s.editData = editData;
		this.s.modifier = items;
		this.s.action = 'edit';
		this.dom.form.style.display = 'block';
		this.s.mode = type;
		this._actionClass();
		$.each(fields, function (name, field) {
			field.multiReset();
			includeInOrder = true;
			editData[name] = {};
			$.each(editFields, function (idSrc, edit) {
				if (edit.fields[name]) {
					var val = field.valFromData(edit.data);
					editData[name][idSrc] = val;
					field.multiSet(idSrc, val !== undefined ? val : field.def());
					if (edit.displayFields && !edit.displayFields[name]) {
						includeInOrder = false;
					}
				}
			});
			if (field.multiIds().length !== 0 && includeInOrder) {
				usedFields.push(name);
			}
		});
		var currOrder = this.order().slice();
		for (var i = currOrder.length - 1; i >= 0; i--) {
			if ($.inArray(currOrder[i].toString(), usedFields) === -1) {
				currOrder.splice(i, 1);
			}
		}
		this._displayReorder(currOrder);
		this._event('initEdit', [_pluck(editFields, 'node')[0], _pluck(editFields, 'data')[0], items, type]);
		this._event('initMultiEdit', [editFields, items, type]);
	};
	Editor.prototype._event = function (trigger, args) {
		if (!args) {
			args = [];
		}
		if ($.isArray(trigger)) {
			for (var i = 0, ien = trigger.length; i < ien; i++) {
				this._event(trigger[i], args);
			}
		} else {
			var e = $.Event(trigger);
			$(this).triggerHandler(e, args);
			return e.result;
		}
	};
	Editor.prototype._eventName = function (input) {
		var c6A = "str", V7T = "tc", name, names = input[(u1A + e6t.v7T)](' ');
		for (var i = 0, ien = names.length; i < ien; i++) {
			name = names[i];
			var onStyle = name[(O3A + V7T + T8T)](/^on([A-Z])/);
			if (onStyle) {
				name = onStyle[1][(e6t.v7T + e6t.C0T + R9h + M4h + m5 + Y1h + v7)]() + name[(e6t.s3T + w4h + c6A + P1h)](3);
			}
			names[i] = name;
		}
		return names[j3T](' ');
	};
	Editor.prototype._fieldFromNode = function (node) {
		var foundField = null;
		$[(S0T + Z3A)](this[e6t.s3T][A5T], function (name, field) {
					if ($(field[n6g]())[(e6t.w5T + B6g + e6t.P8)](node).length) {
						foundField = field;
					}
				}
		);
		return foundField;
	};
	Editor.prototype._fieldNames = function (fieldNames) {
		if (fieldNames === undefined) {
			return this[(e6t.w5T + Z8T + q8h)]();
		}
		else if (!$[(F4g + N3g + o4T)](fieldNames)) {
			return [fieldNames];
		}
		return fieldNames;
	};
	Editor.prototype._focus = function (fieldsIn, focus) {
		var h7h = "xO", that = this, field, fields = $[(h)](fieldsIn, function (fieldOrName) {
					return typeof fieldOrName === (H3A + M0A + V9T + G7h + o4h) ? that[e6t.s3T][(e6t.w5T + Z8T + e6t.n8 + l7T + e6t.s3T)][fieldOrName] : fieldOrName;
				}
		);
		if (typeof focus === 'number') {
			field = fields[focus];
		}
		else if (focus) {
			if (focus[(B6g + a7h + h7h + e6t.w5T)]((s3h + d4A + F4)) === 0) {
				field = $('div.DTE ' + focus[(k3T + e6t.n8 + J4T + h0T + x2 + e6t.n8)](/^jq:/, ''));
			}
			else {
				field = this[e6t.s3T][(e6t.w5T + p6h + l7T + e6t.s3T)][focus];
			}
		}
		this[e6t.s3T][(v7 + e6t.v7T + K0 + f9)] = field;
		if (field) {
			field[(T6 + e6t.U8h + e6t.s3T)]();
		}
	};
	Editor.prototype._formOptions = function (opts) {
		var that = this, inlineCount = __inlineCounter++, namespace = '.dteInline' + inlineCount;
		if (opts.closeOnComplete !== undefined) {
			opts.onComplete = opts.closeOnComplete ? 'close' : 'none';
		}
		if (opts.submitOnBlur !== undefined) {
			opts.onBlur = opts.submitOnBlur ? 'submit' : 'close';
		}
		if (opts.submitOnReturn !== undefined) {
			opts.onReturn = opts.submitOnReturn ? 'submit' : 'none';
		}
		if (opts.blurOnBackground !== undefined) {
			opts.onBackground = opts.blurOnBackground ? 'blur' : 'none';
		}
		this.s.editOpts = opts;
		this.s.editCount = inlineCount;
		if (typeof opts.title === 'string' || typeof opts.title === 'function') {
			this.title(opts.title);
			opts.title = true;
		}
		if (typeof opts.message === 'string' || typeof opts.message === 'function') {
			this.message(opts.message);
			opts.message = true;
		}
		if (typeof opts.buttons !== 'boolean') {
			this.buttons(opts.buttons);
			opts.buttons = true;
		}
		$(document).on('keydown' + namespace, function (e) {
			var el = $(document.activeElement);
			if (e.keyCode === 13 && that.s.displayed) {
				var field = that._fieldFromNode(el);
				if (field && typeof field.canReturnSubmit === 'function' && field.canReturnSubmit(el)) {
					if (opts.onReturn === 'submit') {
						e.preventDefault();
						that.submit();
					} else if (typeof opts.onReturn === 'function') {
						e.preventDefault();
						opts.onReturn(that);
					}
				}
			} else if (e.keyCode === 27) {
				e.preventDefault();
				if (typeof opts.onEsc === 'function') {
					opts.onEsc(that);
				} else if (opts.onEsc === 'blur') {
					that.blur();
				} else if (opts.onEsc === 'close') {
					that.close();
				} else if (opts.onEsc === 'submit') {
					that.submit();
				}
			} else if (el.parents('.DTE_Form_Buttons').length) {
				if (e.keyCode === 37) {
					el.prev('button').focus();
				} else if (e.keyCode === 39) {
					el.next('button').focus();
				}
			}
		});
		this.s.closeIcb = function () {
			$(document).off('keydown' + namespace);
		};
		return namespace;
	};
	Editor.prototype._legacyAjax = function (direction, action, data) {
		var Z3T = 'send', w4T = "gacy";
		if (!this[e6t.s3T][(h0T + e6t.n8 + w4T + N3g + a6T + e6t.X6 + J4h)]) {
			return;
		}
		if (direction === (Z3T)) {
			if (action === (d6h + q8 + j9A) || action === (J2T + b1h + M0A)) {
				var id;
				$[(S0T + Z3A)](data.data, function (rowId, values) {
							var k1T = 'ja', v3 = 'ega', H1h = 'orte';
							if (id !== undefined) {
								throw (E8 + M1T + i3h + r0 + Y8T + h1 + L0A + J3h + M0A + i3h + C7 + K3A + o8h + I9g + J2T + M1T + i3h + o7A + X8T + I9g + i3h + H3A + I9g + G7h + k0h + I9g + H3A + F0g + q4A + H1h + M1T + I9g + u9h + C9A + I9g + M0A + Z9g + I9g + J3h + v3 + R1T + C9A + I9g + a2 + k1T + f9A + I9g + M1T + E1T + M0A + E1T + I9g + H2T + e6t.l7h + K3A + O7h + I7);
							}
							id = rowId;
						}
				);
				data.data = data.data[id];
				if (action === (J2T + x2T)) {
					data[b6h] = id;
				}
			}
			else {
				data[(b6h)] = $[(e6t.E0T + l9)](data.data, function (values, id) {
							return id;
						}
				);
				delete  data.data;
			}
		}
		else {
			if (!data.data && data[(E0g + M4h)]) {
				data.data = [data[P3]];
			}
			else if (!data.data) {
				data.data = [];
			}
		}
	};
	Editor.prototype._optionsUpdate = function (json) {
		var that = this;
		if (json.options) {
			$.each(this.s.fields, function (name, field) {
				if (json.options[name] !== undefined) {
					var fieldInst = that.field(name);
					if (fieldInst && fieldInst.update) {
						fieldInst.update(json.options[name]);
					}
				}
			});
		}
	};
	Editor.prototype._message = function (el, msg) {
		var l0A = "fadeO", d4T = 'func';
		if (typeof msg === (d4T + o7A + q1h)) {
			msg = msg(this, new DataTable[(p0A)](this[e6t.s3T][(Y3g + h0T + e6t.n8)]));
		}
		el = $(el);
		if (!msg && this[e6t.s3T][(e6t.P8 + U6A + A8h + e6t.n8 + e6t.P8)]) {
			el[(O8 + e6t.C0T + J4T)]()[(l0A + Z7T + e6t.v7T)](function () {
						el[e3T]('');
					}
			);
		}
		else if (!msg) {
			el[(a4h + h0T)]('')[x2h]((M1T + i3h + W1A), (G7h + e6t.l7h + C6));
		}
		else if (this[e6t.s3T][(R4h + e6t.s3T + J4T + h0T + a0 + e6t.n8 + e6t.P8)]) {
			el[(e6t.s3T + W8T + J4T)]()[(z7A + o2h)](msg)[(C2A)]();
		}
		else {
			el[(e3T)](msg)[x2h]('display', (u9T + e6t.l7h + R1T + H7h));
		}
	};
	Editor.prototype._multiInfo = function () {
		var s3A = "multiInfoShown", O2h = "iVa", c0h = "isM", R6 = "tiV", fields = this[e6t.s3T][(l9g + w3h)], include = this[e6t.s3T][(Z8T + e6t.F0T + N8 + Q7A + e6t.P8 + e6t.n8 + Z7A)], show = true,
				state;
		if (!include) {
			return;
		}
		for (var i = 0, ien = include.length; i < ien; i++) {
			var field = fields[include[i]], multiEditable = field[Q3h]();
			if (field[(F4g + w7 + Z7T + h0T + R6 + e6t.X6 + h0T + Z7T + e6t.n8)]() && multiEditable && show) {
				state = true;
				show = false;
			}
			else if (field[(c0h + w1h + e6t.v7T + O2h + Q7A + e6t.n8)]() && !multiEditable) {
				state = true;
			}
			else {
				state = false;
			}
			fields[include[i]][s3A](state);
		}
	};
	Editor.prototype._postopen = function (type) {
		var l6 = 'ubble', P3g = 'rna', s9A = 'ditor', U7T = 'mit', l4h = 'sub', o1h = "captureFocus", h6 = "trolle", x8 = "isplay", that = this,
				focusCapture = this[e6t.s3T][(e6t.P8 + x8 + e9h + h6 + k3T)][o1h];
		if (focusCapture === undefined) {
			focusCapture = true;
		}
		$(this[(A9h + e6t.E0T)][V6g])[(r3A)]('submit.editor-internal')[i9T]((l4h + U7T + o7 + J2T + s9A + C7 + i3h + G7h + M0A + J2T + P3g + J3h), function (e) {
					e[W3]();
				}
		);
		if (focusCapture && (type === 'main' || type === (u9h + l6))) {
			$((v9T + M1T + C9A))[i9T]('focus.editor-focus', function () {
						var A7 = "tF", i3T = "setFocus", l1h = "nts", y9 = "pare";
						if ($(document[(e6t.X6 + N8 + A3h + E4 + e6t.t3T + d9 + e6t.v7T)])[(y9 + e6t.I2A + e6t.s3T)]('.DTE').length === 0 && $(document[F7g])[(M5T + k3T + e6t.n8 + l1h)]((o7 + C8 + G3T + X5A)).length === 0) {
							if (that[e6t.s3T][i3T]) {
								that[e6t.s3T][(v7 + A7 + j9 + Z7T + e6t.s3T)][(V3h + g8h)]();
							}
						}
					}
			);
		}
		this[(p2 + v3g + h0T + e6t.v7T + l4T + e6t.F0T + e6t.w5T + e6t.C0T)]();
		this[z5]('open', [type, this[e6t.s3T][(x2 + e6t.v7T + Z8T + i9T)]]);
		return true;
	};
	Editor.prototype._preopen = function (type) {
		var G7 = "nfo", h2A = "Dynam";
		if (this[(p2 + e6t.n8 + A4h + e6t.n8 + e6t.F0T + e6t.v7T)]((G2T + c0T + h1h + G7h), [type, this[e6t.s3T][L2h]]) === false) {
			this[(b0A + h0T + S0T + k3T + h2A + Z8T + N8 + N3 + G7)]();
			this[(p2 + R6A + e6t.F0T + e6t.v7T)]('cancelOpen', [type, this[e6t.s3T][L2h]]);
			this[e6t.s3T][(r7A + e6t.C0T + H7A + e6t.u6)] = null;
			return false;
		}
		this[e6t.s3T][u1h] = type;
		return true;
	};
	Editor.prototype._processing = function (processing) {
		var A9 = 'roce', j8g = "_ev", C7h = "toggleClass", procClass = this[(N8 + y9A + e6t.s3T + f2)][O7g][(x2 + A3h)];
		$((M1T + i3h + Y4A + o7 + C8 + G3T + E8))[C7h](procClass, processing);
		this[e6t.s3T][(C4h + e6t.C0T + N8 + f2 + e6t.s3T + P1h)] = processing;
		this[(j8g + D3h)]((q4A + A9 + H3A + H3A + b7 + o4h), [processing]);
	};
	Editor.prototype._submit = function (successCallback, errorCallback, formatdata, hide) {
		var that = this, i, iLen, eventRet, errorNodes, submitParamsLocal,
				changed = false, allData = {}, changedData = {},
				setBuilder = DataTable.ext.oApi._fnSetObjectDataFn,
				dataSource = this.s.dataSource, fields = this.s.fields,
				action = this.s.action, editCount = this.s.editCount,
				modifier = this.s.modifier, editFields = this.s.editFields,
				editData = this.s.editData, opts = this.s.editOpts,
				changedSubmit = opts.submit, submitParams = {
					action: this.s.action, data: {}
				};
		if (this.s.dbTable) {
			submitParams.table = this.s.dbTable;
		}
		if (action === "create" || action === "edit") {
			$.each(editFields, function (idSrc, edit) {
				var allRowData = {}, changedRowData = {};
				$.each(fields, function (name, field) {
					if (edit.fields[name]) {
						var value = field.multiGet(idSrc), builder = setBuilder(name),
								manyBuilder = $.isArray(value) && name.indexOf('[]') !== -1 ? setBuilder(name.replace(/\[.*$/, '') + '-many-count') : null;
						builder(allRowData, value);
						if (manyBuilder) {
							manyBuilder(allRowData, value.length);
						}
						if (action === 'edit' && (!editData[name] || !_deepCompare(value, editData[name][idSrc]))) {
							builder(changedRowData, value);
							changed = true;
							if (manyBuilder) {
								manyBuilder(changedRowData, value.length);
							}
						}
					}
				});
				if (!$.isEmptyObject(allRowData)) {
					allData[idSrc] = allRowData;
				}
				if (!$.isEmptyObject(changedRowData)) {
					changedData[idSrc] = changedRowData;
				}
			});
			if (action === 'create' || changedSubmit === 'all' || (changedSubmit === 'allIfChanged' && changed)) {
				submitParams.data = allData;
			} else if (changedSubmit === 'changed' && changed) {
				submitParams.data = changedData;
			} else {
				this.s.action = null;
				if (opts.onComplete === 'close' && (hide === undefined || hide)) {
					this._close(false);
				} else if (typeof opts.onComplete === 'function') {
					opts.onComplete(this);
				}
				if (successCallback) {
					successCallback.call(this);
				}
				this._processing(false);
				this._event('submitComplete');
				return;
			}
		} else if (action === 'remove') {
			$.each(editFields, function (idSrc, edit) {
				submitParams.data[idSrc] = edit.data;
			});
		}
		this._legacyAjax('send', action, submitParams);
		submitParamsLocal = $.extend(true, {}, submitParams);
		if (formatdata) {
			formatdata(submitParams);
		}
		if (this._event('preSubmit', [submitParams, action]) === false) {
			this._processing(false);
			return;
		}
		var submitWire = this.s.ajax || this.s.ajaxUrl ? this._ajax : this._submitTable;
		submitWire.call(this, submitParams, function (json, notGood) {
			that._submitSuccess(json, notGood, submitParams, submitParamsLocal, action, editCount, hide, successCallback, errorCallback);
		}, function (xhr, err, thrown) {
			that._submitError(xhr, err, thrown, errorCallback, submitParams);
		});
	};
	Editor.prototype._submitTable = function (data, success, error) {
		var that = this, action = data.action, out = {data: []},
				idGet = DataTable.ext.oApi._fnGetObjectDataFn(this.s.idSrc),
				idSet = DataTable.ext.oApi._fnSetObjectDataFn(this.s.idSrc);
		if (action !== 'remove') {
			var originalData = this._dataSource('fields', this.modifier());
			$.each(data.data, function (key, vals) {
				var toSave;
				if (action === 'edit') {
					var rowData = originalData[key].data;
					toSave = $.extend(true, {}, rowData, vals);
				} else {
					toSave = $.extend(true, {}, vals);
				}
				if (action === 'create' && idGet(toSave) === undefined) {
					idSet(toSave, +new Date() + '' + key);
				} else {
					idSet(toSave, key);
				}
				out.data.push(toSave);
			});
		}
		success(out);
	};
	Editor.prototype._submitSuccess = function (json, notGood, submitParams, submitParamsLocal, action, editCount, hide, successCallback, errorCallback) {
		var that = this, setData, fields = this.s.fields, opts = this.s.editOpts, modifier = this.s.modifier;
		this._legacyAjax('receive', action, json);
		this._event('postSubmit', [json, submitParams, action]);
		if (!json.error) {
			json.error = "";
		}
		if (!json.fieldErrors) {
			json.fieldErrors = [];
		}
		if (notGood || json.error || json.fieldErrors.length) {
			this.error(json.error);
			$.each(json.fieldErrors, function (i, err) {
				var field = fields[err['name']];
				field.error(err['status'] || "Error");
				if (i === 0) {
					if (opts.onFieldError === 'focus') {
						$(that.dom.bodyContent, that.s.wrapper).animate({"scrollTop": $(field.node()).position().top}, 500);
						field.focus();
					} else if (typeof opts.onFieldError === 'function') {
						opts.onFieldError(that, err);
					}
				}
			});
			if (errorCallback) {
				errorCallback.call(that, json);
			}
		} else {
			var store = {};
			if (json.data && (action === "create" || action === 'edit')) {
				this._dataSource('prep', action, modifier, submitParamsLocal, json, store);
				for (var i = 0; i < json.data.length; i++) {
					setData = json.data[i];
					this._event('setData', [json, setData, action]);
					if (action === "create") {
						this._event('preCreate', [json, setData]);
						this._dataSource('create', fields, setData, store);
						this._event(['create', 'postCreate'], [json, setData]);
					} else if (action === "edit") {
						this._event('preEdit', [json, setData]);
						this._dataSource('edit', modifier, fields, setData, store);
						this._event(['edit', 'postEdit'], [json, setData]);
					}
				}
				this._dataSource('commit', action, modifier, json.data, store);
			} else if (action === 'remove') {
				this._dataSource('prep', action, modifier, submitParamsLocal, json, store);
				this._event('preRemove', [json]);
				this._dataSource('remove', modifier, fields, store);
				this._event(['remove', 'postRemove'], [json]);
				this._dataSource('commit', action, modifier, json.data, store);
			}
			if (editCount === this.s.editCount) {
				this.s.action = null;
				if (opts.onComplete === 'close' && (hide === undefined || hide)) {
					this._close(json.data ? true : false);
				} else if (typeof opts.onComplete === 'function') {
					opts.onComplete(this);
				}
			}
			if (successCallback) {
				successCallback.call(that, json);
			}
			this._event('submitSuccess', [json, setData]);
		}
		this._processing(false);
		this._event('submitComplete', [json, setData]);
	};
	Editor.prototype._submitError = function (xhr, err, thrown, errorCallback, submitParams) {
		this._event('postSubmit', [xhr, err, thrown, submitParams]);
		this.error(this.i18n.error.system);
		this._processing(false);
		if (errorCallback) {
			errorCallback.call(this, xhr, err, thrown);
		}
		this._event(['submitError', 'submitComplete'], [xhr, err, thrown, submitParams]);
	};
	Editor.prototype._tidy = function (fn) {
		var that = this, dt = this.s.table ? new $.fn.dataTable.Api(this.s.table) : null, ssp = false;
		if (dt) {
			ssp = dt.settings()[0].oFeatures.bServerSide;
		}
		if (this.s.processing) {
			this.one('submitComplete', function () {
				if (ssp) {
					dt.one('draw', fn);
				} else {
					setTimeout(function () {
						fn();
					}, 10);
				}
			});
			return true;
		} else if (this.display() === 'inline' || this.display() === 'bubble') {
			this.one('close', function () {
				if (!that.s.processing) {
					setTimeout(function () {
						fn();
					}, 10);
				} else {
					that.one('submitComplete', function (e, json) {
						if (ssp && json) {
							dt.one('draw', fn);
						} else {
							setTimeout(function () {
								fn();
							}, 10);
						}
					});
				}
			}).blur();
			return true;
		}
		return false;
	};
	Editor.prototype._weakInArray = function (name, arr) {
		for (var i = 0, ien = arr.length; i < ien; i++) {
			if (name == arr[i]) {
				return i;
			}
		}
		return -1;
	};
	Editor.defaults = {
		table: null,
		ajaxUrl: null,
		fields: [],
		display: 'lightbox',
		ajax: null,
		idSrc: 'DT_RowId',
		events: {},
		i18n: {
			create: {
				button: 'New',
				title: 'Create new entry',
				submit: 'Create'
			},
			edit: {
				button: "Edit",
				title: "Edit entry",
				submit: 'Update'
			},
			remove: {
				button: 'Delete',
				title: 'Delete',
				submit: 'Delete',
				confirm: {
					'_': 'Are you sure you wish to delete %d rows?',
					'1': 'Are you sure you wish to delete 1 row?'
				}
			},
			error: {
				system: 'A system error has occurred (<a target="_blank" href="//datatables.net/tn/12">More information</a>).'
			},
			multi: {
				title: "Multiple values",
				info: 'The selected items contain different values for this input. To edit and set all items for this input to the same value, click or tap here, otherwise they will retain their individual values.',
				restore: "Undo changes",
				noMulti: 'This input can be edited individually, but not part of a group.'
			},
			datetime: {
				previous: 'Previous',
				next: 'Next',
				months: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
				weekdays: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
				amPm: ['am', 'pm'],
				unknown: '-'
			}
		},
		formOptions: {
			bubble: $.extend({}, Editor.models.formOptions, {title: false, message: false, buttons: '_basic', submit: 'changed'}),
			inline: $.extend({}, Editor.models.formOptions, {buttons: false, submit: 'changed'}),
			main: $.extend({}, Editor.models.formOptions)
		},
		legacyAjax: false
	};

	var apiRegister = DataTable.Api.register;

	function __getInst(api) {
		var b4A = "edi", A3A = "oInit", ctx = api[(T0A + p3T + p5)][0];
		return ctx[A3A][(b4A + e6t.v7T + f8)] || ctx[(d3A + R4h + e6t.v7T + e6t.C0T + k3T)];
	}

	function __setBasic(inst, opts, type, plural) {
		var H3g = "essa", m7g = "firm", U3 = "itl";
		if (!opts) {
			opts = {}
			;
		}
		if (opts[V2] === undefined) {
			opts[(e6t.u6 + k7A + T8h + e6t.s3T)] = (Q0h);
		}
		if (opts[y8] === undefined) {
			opts[(e6t.v7T + U3 + e6t.n8)] = inst[(v3h + A6g + e6t.F0T)][type][(U4T + e6t.v7T + h0T + e6t.n8)];
		}
		if (opts[J5T] === undefined) {
			if (type === 'remove') {
				var confirm = inst[(Z8T + T5A + A6g + e6t.F0T)][type][(N8 + i9T + m7g)];
				opts[(L6h + e6t.s3T + e6t.s3T + e6t.X6 + m7)] = plural !== 1 ? confirm[p2][q6g](/%d/, plural) : confirm['1'];
			}
			else {
				opts[(e6t.E0T + H3g + m7)] = '';
			}
		}
		return opts;
	}

	apiRegister('editor()', function () {
		return __getInst(this);
	});
	apiRegister('row.create()', function (opts) {
		var inst = __getInst(this);
		inst[(N8 + k3T + e6t.n8 + e6t.X6 + p3T)](__setBasic(inst, opts, 'create'));
		return this;
	});
	apiRegister('row().edit()', function (opts) {
		var inst = __getInst(this);
		inst[e0h](this[0][0], __setBasic(inst, opts, (e4)));
		return this;
	});
	apiRegister('rows().edit()', function (opts) {
		var inst = __getInst(this);
		inst[(e6t.n8 + e6t.P8 + Z8T + e6t.v7T)](this[0], __setBasic(inst, opts, (M8 + i3h + M0A)));
		return this;
	});
	apiRegister('row().delete()', function (opts) {
		var inst = __getInst(this);
		inst[(k3T + e6t.n8 + j1h + X3A)](this[0][0], __setBasic(inst, opts, 'remove', 1));
		return this;
	});
	apiRegister('rows().delete()', function (opts) {
		var inst = __getInst(this);
		inst[K7h](this[0], __setBasic(inst, opts, 'remove', this[0].length));
		return this;
	});
	apiRegister('cell().edit()', function (type, opts) {
		var Q1A = 'ine';
		if (!type) {
			type = (K5T);
		}
		else if ($[(Z8T + U0g + X3h + Z8T + e6t.F0T + f7T + a6T + h4T + e6t.v7T)](type)) {
			opts = type;
			type = (b7 + J3h + Q1A);
		}
		__getInst(this)[type](this[0][0], opts);
		return this;
	});
	apiRegister('cells().edit()', function (opts) {
		var O9 = "bub";
		__getInst(this)[(O9 + o7g + e6t.n8)](this[0], opts);
		return this;
	});
	apiRegister('fileservice()', _api_file);
	apiRegister('files()', _api_files);
	$(document).on('xhr.dt', function (e, ctx, json) {
		if (e.namespace !== 'dt') {
			return;
		}
		if (json && json.files) {
			$.each(json.files, function (name, files) {
				Editor.files[name] = files;
			});
		}
	});
	Editor.error = function (msg, tn) {
		var N9h = 'efer';
		throw tn ? msg + (I9g + t9T + e6t.l7h + K3A + I9g + O7h + e6h + J2T + I9g + i3h + G7h + H2T + e6h + O7h + E1T + M0A + J7 + G7h + k9 + q4A + V9g + E1T + k2T + I9g + K3A + N9h + I9g + M0A + e6t.l7h + I9g + n4h + M0A + M0A + q4A + H3A + G8T + M1T + f3A + M0A + E1T + u9T + N + o7 + G7h + J2T + M0A + E9 + M0A + G7h + E9) + tn : msg;
	};
	Editor.pairs = function (data, props, fn) {
		var v5T = "lue", i, ien, dataPoint;
		props = $[(e6t.n8 + J4h + e6t.v7T + e6t.n8 + e6t.F0T + e6t.P8)]({label: (J3h + L9h + G4), value: 'value'}, props);
		if ($[(Z8T + e6t.s3T + N3g + k3T + H4)](data)) {
			for (i = 0, ien = data.length; i < ien; i++) {
				dataPoint = data[i];
				if ($[q2h](dataPoint)) {
					fn(dataPoint[props[(e0A + v5T)]] === undefined ? dataPoint[props[u7T]] : dataPoint[props[(e0A + h0T + E6h)]], dataPoint[props[u7T]], i, dataPoint[(e6t.X6 + I2T + k3T)]);
				}
				else {
					fn(dataPoint, dataPoint, i);
				}
			}
		} else {
			i = 0;
			$[(e6t.n8 + e6t.X6 + Z3A)](data, function (key, val) {
						fn(val, key, i);
						i++;
					}
			);
		}
	};
	Editor.safeId = function (id) {
		return id[q6g](/\./g, '-');
	};
	Editor.upload = function (editor, conf, files, progressCallback, completeCallback) {
		var reader = new FileReader(), counter = 0, ids = [], generalError = 'A server error occurred while uploading the file';
		editor.error(conf.name, '');
		progressCallback(conf, conf.fileReadText || '<i>Uploading file</i>');
		reader.onload = function (e) {
			var data = new FormData(), ajax;
			data.append('action', 'upload');
			data.append('uploadField', conf.name);
			data.append('upload', files[counter]);
			if (conf.ajaxData) {
				conf.ajaxData(data);
			}
			if (conf.ajax) {
				ajax = conf.ajax;
			} else if (typeof editor.s.ajax === 'string' || $.isPlainObject(editor.s.ajax)) {
				ajax = editor.s.ajax;
			}
			if (!ajax) {
				throw 'No Ajax option specified for upload plug-in';
			}
			if (typeof ajax === 'string') {
				ajax = {url: ajax};
			}
			var submit = false;
			editor.on('preSubmit.DTE_Upload', function () {
				submit = true;
				return false;
			});
			if (typeof ajax.data === 'function') {
				var d = {}, ret = ajax.data(d);
				if (ret !== undefined) {
					d = ret;
				}
				$.each(d, function (key, value) {
					data.append(key, value);
				});
			}
			$.ajax($.extend({}, ajax, {
						type: 'post',
						data: data,
						dataType: 'json',
						contentType: false,
						processData: false,
						xhr: function () {
							var xhr = $.ajaxSettings.xhr();
							if (xhr.upload) {
								xhr.upload.onprogress = function (e) {
									if (e.lengthComputable) {
										var percent = (e.loaded / e.total * 100).toFixed(0) + "%";
										progressCallback(conf, files.length === 1 ? percent : counter + ':' + files.length + ' ' + percent);
									}
								};
								xhr.upload.onloadend = function (e) {
									progressCallback(conf);
								};
							}
							return xhr;
						},
						success: function (json) {
							editor.off('preSubmit.DTE_Upload');
							editor._event('uploadXhrSuccess', [conf.name, json]);
							if (json.fieldErrors && json.fieldErrors.length) {
								var errors = json.fieldErrors;
								for (var i = 0, ien = errors.length; i < ien; i++) {
									editor.error(errors[i].name, errors[i].status);
								}
							} else if (json.error) {
								editor.error(json.error);
							} else if (!json.upload || !json.upload.id) {
								editor.error(conf.name, generalError);
							} else {
								if (json.files) {
									$.each(json.files, function (table, files) {
										$.extend(Editor.files[table], files);
									});
								}
								ids.push(json.upload.id);
								if (counter < files.length - 1) {
									counter++;
									reader.readAsDataURL(files[counter]);
								} else {
									completeCallback.call(editor, ids);
									if (submit) {
										editor.submit();
									}
								}
							}
						},
						error: function (xhr) {
							editor._event('uploadXhrError', [conf.name, xhr]);
							editor.error(conf.name, generalError);
						}
					}
			));
		};
		reader.readAsDataURL(files[0]);
	};


	(function () {
		var C0 = "G", i4A = "idSrc", S6T = "drawType",
				__dataSources = Editor.dataSources = {},
				__dtIsSsp = function (dt, editor) {
					return dt.settings()[0].oFeatures.bServerSide && editor.s.editOpts.drawType !== 'none';
				},
				__dtApi = function (table) {
					return $(table).DataTable();
				},
				__dtHighlight = function (node) {
					node = $(node);
					setTimeout(function () {
						node.addClass('highlight');
						setTimeout(function () {
							node.addClass('noHighlight').removeClass('highlight');
							setTimeout(function () {
								node.removeClass('noHighlight');
							}, 550);
						}, 500);
					}, 20);
				},
				__dtRowSelector = function (out, dt, identifier, fields, idFn) {
					dt.rows(identifier).indexes().each(function (idx) {
						var row = dt.row(idx);
						var data = row.data();
						var idSrc = idFn(data);
						if (idSrc === undefined) {
							Editor.error('Unable to find row identifier', 14);
						}
						out[idSrc] = {
							idSrc: idSrc,
							data: data,
							node: row.node(),
							fields: fields,
							type: 'row'
						};
					});
				},
				__dtColumnSelector = function (out, dt, identifier, fields, idFn) {
					dt.cells(null, identifier).indexes().each(function (idx) {
						__dtCellSelector(out, dt, idx, fields, idFn);
					});
				},
				__dtCellSelector = function (out, dt, identifier, allFields, idFn, forceFields) {
					dt.cells(identifier).indexes().each(function (idx) {
						var cell = dt.cell(idx);
						var row = dt.row(idx.row);
						var data = row.data();
						var idSrc = idFn(data);
						var fields = forceFields || __dtFieldsFromIdx(dt, allFields, idx.column);
						var isNode = (typeof identifier === 'object' && identifier.nodeName) || identifier instanceof $;
						__dtRowSelector(out, dt, idx.row, allFields, idFn);
						out[idSrc].attach = isNode ? [$(identifier).get(0)] : [cell.node()];
						out[idSrc].displayFields = fields;
					});
				},
				__dtFieldsFromIdx = function (dt, fields, idx) {
					var field;
					var col = dt.settings()[0].aoColumns[idx];
					var dataSrc = col.editField !== undefined ? col.editField : col.mData;
					var resolvedFields = {};
					var run = function (field, dataSrc) {
						if (field.name() === dataSrc) {
							resolvedFields[field.name()] = field;
						}
					};
					$.each(fields, function (name, fieldInst) {
						if ($.isArray(dataSrc)) {
							for (var i = 0; i < dataSrc.length; i++) {
								run(fieldInst, dataSrc[i]);
							}
						} else {
							run(fieldInst, dataSrc);
						}
					});
					if ($.isEmptyObject(resolvedFields)) {
						Editor.error('Unable to automatically determine field from source. Please specify the field name.', 11);
					}
					return resolvedFields;
				},
				__dtjqId = function (id) {
					var h4A = 'tr';
					return typeof id === 'string' ? '#' + id.replace(/(:|\.|\[|\]|,)/g, '\\$1') : '#' + id;
				};

		__dataSources.dataTable = {
			individual: function (identifier, fieldNames) {
				var idFn = DataTable[h0A][(e6t.C0T + N3g + J4T + Z8T)][Y1T](this[e6t.s3T][i4A]), dt = __dtApi(this[e6t.s3T][z7g]), fields = this[e6t.s3T][A5T], out = {}, forceFields, responsiveNode;
				if (fieldNames) {
					if (!$[(Z8T + L1A + k3T + H4)](fieldNames)) {
						fieldNames = [fieldNames];
					}
					forceFields = {};
					$[(v7h + T8T)](fieldNames, function (i, name) {
						forceFields[name] = fields[name];
					});
				}
				__dtCellSelector(out, dt, identifier, fields, idFn, forceFields);
				return out;
			},
			fields: function (identifier) {
				var V3 = "olum", E9h = "ws", S6 = "taFn", A1T = "etO", L8h = "oAp",
						idFn = DataTable[h0A][(L8h + Z8T)][(p2 + p7T + C0 + A1T + e6t.u6 + g5A + T1h + J0 + e6t.X6 + S6)](this[e6t.s3T][i4A]), dt = __dtApi(this[e6t.s3T][z7g]),
						fields = this[e6t.s3T][A5T], out = {};
				if ($[q2h](identifier) && (identifier[(E0g + E9h)] !== undefined || identifier[q9] !== undefined || identifier[(N8 + e6t.n8 + h0T + R7A)] !== undefined)) {
					if (identifier[(E0g + E9h)] !== undefined) {
						__dtRowSelector(out, dt, identifier[(P3 + e6t.s3T)], fields, idFn);
					}
					if (identifier[q9] !== undefined) {
						__dtColumnSelector(out, dt, identifier[(N8 + V3 + e6t.F0T + e6t.s3T)], fields, idFn);
					}
					if (identifier[I6h] !== undefined) {
						__dtCellSelector(out, dt, identifier[I6h], fields, idFn);
					}
				} else {
					__dtRowSelector(out, dt, identifier, fields, idFn);
				}
				return out;
			},
			create: function (fields, data) {
				var dt = __dtApi(this[e6t.s3T][(e6t.v7T + l5 + h0T + e6t.n8)]);
				if (!__dtIsSsp(dt, this)) {
					var row = dt[(k3T + T5)][T7A](data);
					__dtHighlight(row[(n6g)]());
				}
			},
			edit: function (identifier, fields, data, store) {
				var B3h = "splice", g7T = "rowId", b0g = "wId", U7 = "Ap", n5 = 'non', N6A = "Typ", g4 = "aw", dt = __dtApi(this[e6t.s3T][(W9T + e6t.u6 + e6t.t3T)]);
				if (!__dtIsSsp(dt, this) || this[e6t.s3T][Z2][(e6t.P8 + k3T + g4 + N6A + e6t.n8)] === (n5 + J2T)) {
					var idFn = DataTable[h0A][(e6t.C0T + U7 + Z8T)][Y1T](this[e6t.s3T][(b6h + i9 + k3T + N8)]), rowId = idFn(data), row;
					row = dt[(k3T + T5)](__dtjqId(rowId));
					if (!row[(e6t.X6 + X3)]()) {
						row = dt[P3](function (rowIdx, rowData, rowNode) {
							return rowId == idFn(rowData);
						});
					}
					if (row[r3h]()) {
						row.data(data);
						var idx = $[(G4A + k3T + o9g + H3h)](rowId, store[(k3T + e6t.C0T + b0g + e6t.s3T)]);
						store[(g7T + e6t.s3T)][B3h](idx, 1);
					} else {
						row = dt[(P3)][(e6t.X6 + e6t.P8 + e6t.P8)](data);
					}
					__dtHighlight(row[(n6g)]());
				}
			},
			remove: function (identifier, fields, store) {
				var r0h = "every", M6T = "anc", dt = __dtApi(this[e6t.s3T][(e6t.v7T + e6t.X6 + M0)]), cancelled = store[(N8 + M6T + e6t.n8 + h0T + e6t.t3T + e6t.P8)];
				if (!__dtIsSsp(dt, this)) {
					if (cancelled.length === 0) {
						dt[(k3T + e6t.C0T + M4h + e6t.s3T)](identifier)[(Y2A + w7g)]();
					} else {
						var idFn = DataTable[h0A][(R6g + M0T)][Y1T](this[e6t.s3T][i4A]), indexes = [];
						dt[Y6A](identifier)[r0h](function () {
							var P3T = "nArra", id = idFn(this.data());
							if ($[(Z8T + P3T + H3h)](id, cancelled) === -1) {
								indexes[(J4T + H6T)](this[(Z8h + e6t.n8 + J4h)]());
							}
						});
						dt[Y6A](indexes)[(k3T + e6t.n8 + e6t.E0T + e6t.C0T + X3A)]();
					}
				}
			},
			prep: function (action, identifier, submit, json, store) {
				var a7 = "cancelled", s9g = "canc";
				if (action === (M8 + B9)) {
					var cancelled = json[(s9g + e6t.n8 + h0T + h0T + e6t.n8 + e6t.P8)] || [];
					store[(k3T + e6t.C0T + M4h + O0g)] = $[(O3A + J4T)](submit.data, function (val, key) {
						return !$[b3](submit.data[key]) && $[R2](key, cancelled) === -1 ? key : undefined;
					});
				} else if (action === 'remove') {
					store[(s9g + x7T + h0T + L2)] = json[a7] || [];
				}
			},
			commit: function (action, identifier, data, store) {
				var H5 = "draw", p4g = "ctD", r8 = "rowIds", H4g = 'edi', dt = __dtApi(this[e6t.s3T][z7g]);
				if (action === (H4g + M0A) && store[r8].length) {
					var ids = store[(k3T + e6t.C0T + M4h + N3 + N6T)], idFn = DataTable[(h0A)][(R6g + J4T + Z8T)][(s8 + C0 + e6t.n8 + W0 + b2h + p4g + V7 + e6t.X6 + K0 + e6t.F0T)](this[e6t.s3T][i4A]),
							row;
					for (var i = 0, ien = ids.length; i < ien; i++) {
						row = dt[(k3T + e6t.C0T + M4h)](__dtjqId(ids[i]));
						if (!row[(K + H3h)]()) {
							row = dt[P3](function (rowIdx, rowData, rowNode) {
								return ids[i] == idFn(rowData);
							});
						}
						if (row[(K + H3h)]()) {
							row[(Y2A + e6t.E0T + N0A)]();
						}
					}
				}
				var drawType = this[e6t.s3T][Z2][S6T];
				if (drawType !== (b6A)) {
					dt[(H5)](drawType);
				}
			}
		};

		function __html_get(identifier, dataSrc) {
			var el = __html_el(identifier, dataSrc);
			return el.filter('[data-editor-value]').length ? el.attr('data-editor-value') : el.html();
		}

		function __html_set(identifier, fields, data) {
			$.each(fields, function (name, field) {
				var val = field.valFromData(data);
				if (val !== undefined) {
					var el = __html_el(identifier, field.dataSrc());
					if (el.filter('[data-editor-value]').length) {
						el.attr('data-editor-value', val);
					} else {
						el.each(function () {
							while (this.childNodes.length) {
								this.removeChild(this.firstChild);
							}
						}).html(val);
					}
				}
			});
		}

		function __html_els(identifier, names) {
			var out = $();
			for (var i = 0, ien = names.length; i < ien; i++) {
				out = out.add(__html_el(identifier, names[i]));
			}
			return out;
		}

		function __html_el(identifier, name) {
			var context = identifier === 'keyless' ? document : $('[data-editor-id="' + identifier + '"]');
			return $('[data-editor-field="' + name + '"]', context);
		}

		__dataSources.html = {
			initField: function (cfg) {
				var v3A = 'abe', label = $((j8T + M1T + f3A + C7 + J2T + x2T + e6h + C7 + J3h + v3A + J3h + c9g) + (cfg.data || cfg[(g1T + e6t.n8)]) + '"]');
				if (!cfg[(u7T)] && label.length) {
					cfg[(C8T + e6t.n8 + h0T)] = label[(T8T + e6t.v7T + o2h)]();
				}
			},
			individual: function (identifier, fieldNames) {
				var K4h = 'our', a1h = 'om', G1T = 'term', z8h = 'omati', e1T = 'Can', f6 = 'yless', O1T = 'andS', b9h = 'ac', H6g = "nodeName", attachEl;
				if (identifier instanceof $ || identifier[H6g]) {
					attachEl = identifier;
					if (!fieldNames) {
						fieldNames = [$(identifier)[(e6t.X6 + t9A)]((A4A + C7 + J2T + M1T + i3h + r0 + C7 + H2T + i3h + Z1))];
					}
					var back = $[(p7T)][N1] ? (o9h + M1T + k6 + b9h + H7h) : (O1T + J2T + J3h + H2T);
					identifier = $(identifier)[Z3h]((j8T + M1T + E1T + M0A + E1T + C7 + J2T + M1T + t7h + C7 + i3h + M1T + p6T))[back]().data((M8 + B9 + e6h + C7 + i3h + M1T));
				}
				if (!identifier) {
					identifier = (H7h + J2T + f6);
				}
				if (fieldNames && !$[(Z9A + k3T + k3T + e6t.X6 + H3h)](fieldNames)) {
					fieldNames = [fieldNames];
				}
				if (!fieldNames || fieldNames.length === 0) {
					throw (e1T + G7h + e6t.l7h + M0A + I9g + E1T + L0A + M0A + z8h + R1T + E1T + M0g + C9A + I9g + M1T + J2T + G1T + i3h + C6 + I9g + H2T + Z9 + M1T + I9g + G7h + p9h + I9g + H2T + K3A + a1h + I9g + M1T + f3A + I9g + H3A + K4h + R1T + J2T);
				}
				var out = __dataSources[e3T][(e6t.w5T + Z8T + x7T + N6T)][(y4A + v0T)](this, identifier), fields = this[e6t.s3T][A5T], forceFields = {};
				$[B1A](fieldNames, function (i, name) {
					forceFields[name] = fields[name];
				});
				$[(e6t.n8 + x2 + T8T)](out, function (id, set) {
					var m6h = "toArray";
					set[(Q9h + J4T + e6t.n8)] = (R1T + J2T + M0g);
					set[(z6A + m4h)] = attachEl ? $(attachEl) : __html_els(identifier, fieldNames)[(m6h)]();
					set[A5T] = fields;
					set[(h9 + O3h + e6t.X6 + H3h + K0 + k4h + e6t.P8 + e6t.s3T)] = forceFields;
				});
				return out;
			},
			fields: function (identifier) {
				var I3g = 'keyles', out = {}, data = {}, fields = this[e6t.s3T][(S1 + q8h)];
				if (!identifier) {
					identifier = (I3g + H3A);
				}
				$[B1A](fields, function (name, field) {
					var X9 = "valToData", Z4A = "aSrc", val = __html_get(identifier, field[(e6t.P8 + V7 + Z4A)]());
					field[X9](data, val === null ? undefined : val);
				});
				out[identifier] = {idSrc: identifier, data: data, node: document, fields: fields, type: 'row'};
				return out;
			},
			create: function (fields, data) {
				if (data) {
					var idFn = DataTable[(h0A)][(e6t.C0T + N3g + J4T + Z8T)][Y1T](this[e6t.s3T][i4A]), id = idFn(data);
					if ($((j8T + M1T + E1T + M0A + E1T + C7 + J2T + M1T + B9 + e6h + C7 + i3h + M1T + c9g) + id + (N3T)).length) {
						__html_set(id, fields, data);
					}
				}
			},
			edit: function (identifier, fields, data) {
				var idFn = DataTable[h0A][G0h][Y1T](this[e6t.s3T][i4A]), id = idFn(data) || 'keyless';
				__html_set(id, fields, data);
			},
			remove: function (identifier, fields) {
				var V5h = 'dito';
				$((j8T + M1T + E1T + T2h + C7 + J2T + V5h + K3A + C7 + i3h + M1T + c9g) + identifier + (N3T))[(k3T + e6t.n8 + j1h + A4h + e6t.n8)]();
			}
		};
	}());

	Editor.classes = {
		wrapper: 'DTE',
		processing: {
			indicator: 'DTE_Processing_Indicator',
			active: 'processing'
		},
		header: {
			wrapper: 'DTE_Header',
			content: "DTE_Header_Content"
		},
		body: {
			wrapper: "DTE_Body",
			content: 'DTE_Body_Content'
		},
		footer: {
			wrapper: 'DTE_Footer',
			content: 'DTE_Footer_Content'
		},
		form: {
			wrapper: 'DTE_Form',
			content: 'DTE_Form_Content',
			tag: '',
			info: 'DTE_Form_Info',
			error: 'DTE_Form_Error',
			buttons: 'DTE_Form_Buttons',
			button: 'btn'
		},
		field: {
			wrapper: 'DTE_Field',
			typePrefix: 'DTE_Field_Type_',
			namePrefix: 'DTE_Field_Name_',
			label: 'DTE_Label',
			input: 'DTE_Field_Input',
			inputControl: 'DTE_Field_InputControl',
			error: 'DTE_Field_StateError',
			'msg-label': 'DTE_Label_Info',
			'msg-error': 'DTE_Field_Error',
			'msg-message': 'DTE_Field_Message',
			'msg-info': 'DTE_Field_Info',
			multiValue: 'multi-value',
			multiInfo: 'multi-info',
			multiRestore: 'multi-restore',
			multiNoEdit: 'multi-noEdit',
			disabled: 'disabled'
		},
		actions: {
			create: 'DTE_Action_Create',
			edit: 'DTE_Action_Edit',
			remove: 'DTE_Action_Remove'
		},
		inline: {
			wrapper: 'DTE DTE_Inline',
			liner: 'DTE_Inline_Field',
			buttons: 'DTE_Inline_Buttons'
		},
		bubble: {
			wrapper: 'DTE DTE_Bubble',
			liner: 'DTE_Bubble_Liner',
			table: 'DTE_Bubble_Table',
			close: 'icon close',
			pointer: 'DTE_Bubble_Triangle',
			bg: 'DTE_Bubble_Background'
		}
	};

	// 扩展 buttons 按钮
	(function () {
		if (DataTable.TableTools) {
			var ttButtons = DataTable.TableTools.BUTTONS,
					ttButtonBase = {
						sButtonText: null,
						editor: null,
						formTitle: null
					};
			ttButtons.editor_create = $.extend(true, ttButtons.text, ttButtonBase, {
				formButtons: [{
					label: null, fn: function (e) {
						this.submit();
					}
				}],
				fnClick: function (button, config) {
					var editor = config.editor, i18nCreate = editor.i18n.create, buttons = config.formButtons;
					if (!buttons[0].label) {
						buttons[0].label = i18nCreate.submit;
					}
					editor.create({title: i18nCreate.title, buttons: buttons});
				}
			});
			ttButtons.editor_edit = $.extend(true, ttButtons.select_single, ttButtonBase, {
				formButtons: [{
					label: null, fn: function (e) {
						this.submit();
					}
				}],
				fnClick: function (button, config) {
					var selected = this.fnGetSelectedIndexes();
					if (selected.length !== 1) {
						return;
					}
					var editor = config.editor, i18nEdit = editor.i18n.edit, buttons = config.formButtons;
					if (!buttons[0].label) {
						buttons[0].label = i18nEdit.submit;
					}
					editor.edit(selected[0], {title: i18nEdit.title, buttons: buttons});
				}
			});
			ttButtons.editor_remove = $.extend(true, ttButtons.select, ttButtonBase, {
				question: null,
				formButtons: [{
					label: null, fn: function (e) {
						var that = this;
						this.submit(function (json) {
							var tt = $.fn.dataTable.TableTools.fnGetInstance($(that.s.table).DataTable().table().node());
							tt.fnSelectNone();
						});
					}
				}],
				fnClick: function (button, config) {
					var rows = this.fnGetSelectedIndexes();
					if (rows.length === 0) {
						return;
					}
					var editor = config.editor, i18nRemove = editor.i18n.remove, buttons = config.formButtons,
							question = typeof i18nRemove.confirm === 'string' ? i18nRemove.confirm : i18nRemove.confirm[rows.length] ? i18nRemove.confirm[rows.length] : i18nRemove.confirm._;
					if (!buttons[0].label) {
						buttons[0].label = i18nRemove.submit;
					}
					editor[remove](rows, {message: question.replace(/%d/g, rows.length), title: i18nRemove.title, buttons: buttons});
				}
			});
		}

		var _buttons = DataTable.ext.buttons;
		$.extend(_buttons, {
			create: {
				text: function (dt, node, config) {
					return dt.i18n('buttons.create', config.editor.i18n.create.button);
				},
				className: 'buttons-create',
				editor: null,
				formButtons: {
					label: function (editor) {
						return editor.i18n.create.submit;
					},
					fn: function (e) {
						this.submit();
					}
				},
				formMessage: null,
				formTitle: null,
				action: function (e, dt, node, config) {
					var editor = config.editor, buttons = config.formButtons;
					editor.create({
						buttons: config.formButtons,
						message: config.formMessage,
						title: config.formTitle || editor.i18n.create.title
					});
				}
			},
			edit: {
				extend: 'selected',
				text: function (dt, node, config) {
					return dt.i18n('buttons.edit', config.editor.i18n.edit.button);
				},
				className: 'buttons-edit',
				editor: null,
				formButtons: {
					label: function (editor) {
						return editor.i18n.edit.submit;
					},
					fn: function (e) {
						this.submit();
					}
				},
				formMessage: null,
				formTitle: null,
				action: function (e, dt, node, config) {
					var editor = config.editor,
							rows = dt.rows({selected: true}).indexes(),
							columns = dt.columns({selected: true}).indexes(),
							cells = dt.cells({selected: true}).indexes(),
							items = columns.length || cells.length ? {rows: rows, columns: columns, cells: cells} : rows;
					editor.edit(items, {
						message: config.formMessage,
						buttons: config.formButtons,
						title: config.formTitle || editor.i18n.edit.title
					});
				}
			},
			remove: {
				extend: 'selected',
				text: function (dt, node, config) {
					return dt.i18n('buttons.remove', config.editor.i18n.remove.button);
				},
				className: 'buttons-remove',
				editor: null,
				formButtons: {
					label: function (editor) {
						return editor.i18n.remove.submit;
					},
					fn: function (e) {
						this.submit();
					}
				},
				formMessage: function (editor, dt) {
					var rows = dt.rows({selected: true}).indexes(),
							i18n = editor.i18n.remove,
							question = typeof i18n.confirm === 'string' ? i18n.confirm : i18n.confirm[rows.length] ? i18n.confirm[rows.length] : i18n.confirm._;
					return question.replace(/%d/g, rows.length);
				},
				formTitle: null,
				action: function (e, dt, node, config) {
					var C8h = "mov", E4A = "formMessage", editor = config.editor;
					editor.remove(dt.rows({selected: true}).indexes(), {
						buttons: config.formButtons,
						message: config.formMessage,
						title: config.formTitle || editor.i18n.remove.title
					});
				}
			}
		});
		_buttons.editSingle = $.extend({}, _buttons.edit);
		_buttons.editSingle.extend = 'selectedSingle';
		_buttons.removeSingle = $.extend({}, _buttons.remove);
		_buttons.removeSingle.extend = 'selectedSingle';
	}());

	Editor.fieldTypes = {};
	Editor.DateTime = function (input, opts) {
		var P7g = "_constructor", r5A = "calendar", s7 = "date", d0T = "ndexOf", h6h = "DateTime", H1 = 'im', e5A = 'nda', e3A = 'ale', K0h = 'itl', t8T = 'ror', X6T = 'tes', M1 = 'ele', j3 = 'Righ',
				d1h = "ous", T2A = "prev", l0g = 'conL', L3A = 'tl', n6A = "next", e1 = "Y", e9 = "rmat", b5 = "js", R1 = "oment", D4 = "tho", W9h = ": ", k9g = "orma", Y7T = "refi", I4A = "defa";
		this[N8] = $[B6T](true, {}, Editor[(J0 + V7 + e6t.n8 + V9 + Z8T + e6t.E0T + e6t.n8)][(I4A + w1h + r2T)], opts);
		var classPrefix = this[N8][(N8 + h0T + e6t.X6 + e6t.s3T + e6t.s3T + S3 + Y7T + J4h)], i18n = this[N8][(a0T)];
		if (!window[(e6t.E0T + e6t.C0T + L6h + e6t.F0T + e6t.v7T)] && this[N8][(e6t.w5T + k9g + e6t.v7T)] !== 'YYYY-MM-DD') {
			throw (E4 + R4h + W8T + k3T + L9A + e6t.P8 + e6t.X6 + p3T + e6t.v7T + Z8T + L6h + W9h + G7T + Z8T + D4 + Z7T + e6t.v7T + L9A + e6t.E0T + R1 + b5 + L9A + e6t.C0T + e6t.F0T + h0T + H3h + L9A + e6t.v7T + N7T + L9A + e6t.w5T + e6t.C0T + e9 + R0 + e1 + e1 + e1 + e1 + F8A + w7 + w7 + F8A + J0 + J0 + O7A + N8 + e6t.X6 + e6t.F0T + L9A + e6t.u6 + e6t.n8 + L9A + Z7T + v7 + e6t.P8);
		}
		var timeBlock = function (type) {
					var M1A = 'nD', g4h = "previous", B3g = 'onU', M9h = 'oc', n6 = 'eb';
					return (V4 + M1T + i3h + Y4A + I9g + R1T + O1h + H3A + H3A + c9g)
							+ classPrefix + (C7 + M0A + i3h + O7h + n6 + J3h + M9h + H7h + Q9)
							+ (V4 + M1T + i3h + Y4A + I9g + R1T + J3h + E1T + H3A + H3A + c9g)
							+ classPrefix + (C7 + i3h + R1T + B3g + q4A + Q9)
							+ '<button>' + i18n[g4h] + (q8g + u9h + L0A + L8T + J5) + '</div>'
							+ (V4 + M1T + i3h + Y4A + I9g + R1T + J3h + E1T + O0h + c9g) + classPrefix + '-label">'
							+ (V4 + H3A + q4A + E1T + G7h + n9) + (V4 + H3A + G4 + Z7g + I9g + R1T + O1h + O0h + c9g) + classPrefix + '-' + type + (z4h) + '</div>'
							+ '<div class="' + classPrefix + (C7 + i3h + R1T + e6t.l7h + M1A + o8h + G7h + Q9) + (V4 + u9h + b6g + V0A + G7h + J5) + i18n[n6A] + '</button>'
							+ '</div>' + (q8g + M1T + z0 + J5);
				},
				gap = function () {
					var L4 = '>:</';
					return (V4 + H3A + G5A + L4 + H3A + n4A + G7h + J5);
				},
				structure = $((V4 + M1T + i3h + Y4A + I9g + R1T + J3h + Y5A + c9g)
						+ classPrefix + (Q9) + (V4 + M1T + z0 + I9g + R1T + J3h + E1T + O0h + c9g)
						+ classPrefix + (C7 + M1T + w4A + Q9)
						+ '<div class="' + classPrefix + (C7 + M0A + i3h + L3A + J2T + Q9)
						+ '<div class="' + classPrefix + (C7 + i3h + l0g + J2T + K3T + Q9) + (V4 + u9h + w2T + G7h + J5)
						+ i18n[(T2A + Z8T + d1h)] + (q8g + u9h + L0A + r6A + q1h + J5) + (q8g + M1T + z0 + J5)
						+ (V4 + M1T + i3h + Y4A + I9g + R1T + J3h + E1T + H3A + H3A + c9g)
						+ classPrefix + (C7 + i3h + z0g + G7h + j3 + M0A + Q9) + (V4 + u9h + L0A + L8T + J5)
						+ i18n[n6A] + (q8g + u9h + b6g + V0A + G7h + J5) + (q8g + M1T + i3h + Y4A + J5)
						+ '<div class="' + classPrefix + '-label">' + (V4 + H3A + q4A + W + n9) + '<select class="' + classPrefix + '-month"/>' + '</div>'
						+ '<div class="' + classPrefix + (C7 + J3h + E1T + u9h + G4 + Q9)
						+ (V4 + H3A + n4A + G7h + n9) + (V4 + H3A + M1 + R1T + M0A + I9g + R1T + J3h + E1T + O0h + c9g) + classPrefix + '-year"/>'
						+ (q8g + M1T + i3h + Y4A + J5) + (q8g + M1T + i3h + Y4A + J5) + (V4 + M1T + i3h + Y4A + I9g + R1T + O1h + O0h + c9g)
						+ classPrefix + '-calendar"/>'
						+ (q8g + M1T + z0 + J5) + (V4 + M1T + z0 + I9g + R1T + O1h + O0h + c9g)
						+ classPrefix + (C7 + M0A + i3h + O7h + J2T + Q9)
						+ timeBlock('hours') + gap() + timeBlock((O7h + i3h + H7T + X6T)) + gap() + timeBlock('seconds') + timeBlock((E1T + O7h + g2A))
						+ (q8g + M1T + i3h + Y4A + J5) + (V4 + M1T + i3h + Y4A + I9g + R1T + J3h + E1T + O0h + c9g)
						+ classPrefix + (C7 + J2T + K3A + t8T + z4h) + (q8g + M1T + z0 + J5));
		this.dom = {
			container: structure,
			date: structure[T4g]('.' + classPrefix + (C7 + M1T + E1T + M0A + J2T)),
			title: structure[(e6t.w5T + Z8T + N4g)]('.' + classPrefix + (C7 + M0A + K0h + J2T)),
			calendar: structure[T4g]('.' + classPrefix + (C7 + R1T + e3A + e5A + K3A)),
			time: structure[(S1 + e6t.F0T + e6t.P8)]('.' + classPrefix + (C7 + M0A + H1 + J2T)),
			error: structure[(T4g)]('.' + classPrefix + '-error'),
			input: $(input)
		};
		this.s = {
			d: null,
			display: null,
			namespace: (M8 + i3h + M0A + e6t.l7h + K3A + C7 + M1T + I7 + J2T + i3h + F6 + C7) + (Editor[h6h][s8T]++),
			parts: {
				date: this[N8][k4A][P8A](/[YMD]|L(?!T)|l/) !== null,
				time: this[N8][k4A][(O3A + e6t.v7T + Z3A)](/[Hhm]|LT|LTS/) !== null,
				seconds: this[N8][(T6 + x8A + e6t.X6 + e6t.v7T)][(Z8T + d0T)]('s') !== -1,
				hours12: this[N8][(T6 + e9)][P8A](/[haA]/) !== null
			}
		};
		this[I0h][(N8 + i9T + W9T + B6g + m5)][(e6t.X6 + K4T + e6t.P8)](this[I0h][s7])[(e6t.X6 + J4T + J4T + p6 + e6t.P8)](this[I0h][(U4T + e6t.E0T + e6t.n8)])[W5A](this[(e6t.P8 + U9T)].error);
		this[(e6t.P8 + U9T)][(s7)][(e6t.X6 + k9h + N4g)](this[(A9h + e6t.E0T)][y8])[W5A](this[(I0h)][r5A]);
		this[P7g]();
	};
	$.extend(Editor.DateTime.prototype, {
		destroy: function () {
			var j7A = "_hi";
			this[(j7A + e6t.P8 + e6t.n8)]();
			this[I0h][N3A][r3A]().empty();
			this[I0h][(Z8T + e6t.F0T + J4T + k7A)][r3A]('.editor-datetime');
		},
		errorMsg: function (msg) {
			var error = this[I0h].error;
			if (msg) {
				error[(T8T + e6t.v7T + o2h)](msg);
			} else {
				error.empty();
			}
		},
		hide: function () {
			var G0A = "ide";
			this[(p2 + T8T + G0A)]();
		},
		max: function (date) {
			var d0A = "lan", T0 = "_optionsTitle", r5h = "axD";
			this[N8][(e6t.E0T + r5h + e6t.X6 + p3T)] = date;
			this[T0]();
			this[(m1h + e6t.n8 + e6t.v7T + t3g + e6t.X6 + d0A + e6t.P8 + e6t.n8 + k3T)]();
		},
		min: function (date) {
			var z6h = "minDate";
			this[N8][z6h] = date;
			this[(E0h + J4T + e6t.v7T + Z8T + e6t.C0T + b2A + R3h + S8T)]();
			this[k0T]();
		},
		owns: function (node) {
			var z4g = "ntain";
			return $(node)[Z3h]()[z8A](this[(A9h + e6t.E0T)][(N8 + e6t.C0T + z4g + m5)]).length > 0;
		},
		val: function (set, write) {
			var B9T = "etTim", A8A = "spla", q0A = "rin", R8T = "toS", k9A = "toDate", t1h = "isValid", f1A = "ict", Q2T = "mentS", s3 = "tL", l6A = "momen", d3h = "Utc", B8A = "teTo";
			if (set === undefined) {
				return this[e6t.s3T][e6t.P8];
			}
			if (set instanceof Date) {
				this[e6t.s3T][e6t.P8] = this[(N2h + B8A + d3h)](set);
			} else if (set === null || set === '') {
				this[e6t.s3T][e6t.P8] = null;
			} else if (typeof set === 'string') {
				if (window[(l6A + e6t.v7T)]) {
					var m = window[(e6t.E0T + e6t.C0T + e6t.E0T + e6t.n8 + e6t.F0T + e6t.v7T)][(Z7T + e6t.v7T + N8)](set, this[N8][(e6t.w5T + e6t.C0T + x8A + e6t.X6 + e6t.v7T)], this[N8][(e6t.E0T + e6t.C0T + d9 + s3 + e6t.C0T + D5h + e6t.n8)], this[N8][(e6t.E0T + e6t.C0T + Q2T + O2T + f1A)]);
					this[e6t.s3T][e6t.P8] = m[t1h]() ? m[k9A]() : null;
				} else {
					var match = set[(P8A)](/(\d{4})\-(\d{2})\-(\d{2})/);
					this[e6t.s3T][e6t.P8] = match ? new Date(Date[(e9A)](match[1], match[2] - 1, match[3])) : null;
				}
			}
			if (write || write === undefined) {
				if (this[e6t.s3T][e6t.P8]) {
					this[W6g]();
				} else {
					this[(e6t.P8 + U9T)][C0A][(A4h + P7T)](set);
				}
			}
			if (!this[e6t.s3T][e6t.P8]) {
				this[e6t.s3T][e6t.P8] = this[(p2 + e6t.P8 + V7 + w7A + n9T + e6t.v7T + N8)](new Date());
			}
			this[e6t.s3T][(h9 + O3h + a0)] = new Date(this[e6t.s3T][e6t.P8][(R8T + e6t.v7T + q0A + b5T)]());
			this[e6t.s3T][(R4h + A8A + H3h)][x0h](1);
			this[n5h]();
			this[k0T]();
			this[(m1h + B9T + e6t.n8)]();
		},
		_constructor: function () {
			var b6 = 'selec', V3g = 'ateti', G9 = 'et', a2A = 'focu', o0T = "Pm", U0 = "_options", u7h = "sIn", r4A = "ond", z6T = "onsTime", n1h = "minutesIncrement", l6g = "_optionsTime",
					Y3 = "rs12", u0g = "ptionsTime", l2T = "_op", r1h = "last", m6 = "chil", c7h = "rs1", q9h = "hou", X0T = "art", F6g = "hil", S4T = "q", B7g = 'imeb', q3g = 'atet', S7T = "time",
					q6T = "seconds", E1 = "rts", J9g = "parts", p8T = "ha", that = this, classPrefix = this[N8][i0g], container = this[(I0h)][(N8 + i9T + e6t.v7T + t5h + k3T)], i18n = this[N8][a0T],
					onChange = this[N8][(e6t.C0T + e6t.F0T + t3g + p8T + e6t.F0T + b5T + e6t.n8)];
			if (!this[e6t.s3T][J9g][(e6t.P8 + Y5)]) {
				this[I0h][(e6t.t6h + p3T)][x2h]('display', (Z6T + C6));
			}
			if (!this[e6t.s3T][(J4T + e6t.X6 + E1)][(U4T + e6t.E0T + e6t.n8)]) {
				this[(e6t.P8 + e6t.C0T + e6t.E0T)][(U4T + e6t.E0T + e6t.n8)][x2h]('display', 'none');
			}
			if (!this[e6t.s3T][J9g][q6T]) {
				this[(e6t.P8 + U9T)][S7T][P0g]((M1T + z0 + o7 + J2T + M1T + i3h + M0A + e6t.l7h + K3A + C7 + M1T + q3g + i3h + O7h + J2T + C7 + M0A + B7g + B4g + X6g))[(e6t.n8 + S4T)](2)[(Y2A + e6t.E0T + A5 + e6t.n8)]();
				this[I0h][(S7T)][(N8 + F6g + e6t.P8 + k3T + e6t.n8 + e6t.F0T)]((H3A + n4A + G7h))[(e6t.n8 + S4T)](1)[(k3T + e6t.n8 + w7g)]();
			}
			if (!this[e6t.s3T][(J4T + X0T + e6t.s3T)][(q9h + c7h + G8A)]) {
				this[(A9h + e6t.E0T)][(e6t.v7T + Z8T + L6h)][(m6 + e6t.P8 + k3T + e6t.n8 + e6t.F0T)]('div.editor-datetime-timeblock')[r1h]()[(Y2A + e6t.E0T + e6t.C0T + X3A)]();
			}
			this[(l2T + J8h + R3h + S8T)]();
			this[(p2 + e6t.C0T + u0g)]((n4h + e6t.l7h + N0g + H3A), this[e6t.s3T][(J9g)][(F3A + Z7T + Y3)] ? 12 : 24, 1);
			this[l6g]('minutes', 60, this[N8][n1h]);
			this[(p2 + e6t.C0T + d7 + z6T)]((H3A + U8 + e6t.l7h + G7h + M1T + H3A), 60, this[N8][(e6t.s3T + h4T + r4A + u7h + r8A + d9 + e6t.v7T)]);
			this[U0]((E1T + O7h + q4A + O7h), ['am', 'pm'], i18n[(E + o0T)]);
			this[(e6t.P8 + U9T)][(Q7g + k7A)][i9T]((a2A + H3A + o7 + J2T + M1T + i3h + M0A + e6t.l7h + K3A + C7 + M1T + E1T + M0A + G9 + i3h + F6 + I9g + R1T + J3h + i3h + X6g + o7 + J2T + b1h + r0 + C7 + M1T + V3g + O7h + J2T), function () {
				var o8 = "_show";
				if (that[(I0h)][N3A][(Z8T + e6t.s3T)]((F4 + Y4A + i3h + H3A + i3h + i7g)) || that[I0h][(C0A)][(F4g)](':disabled')) {
					return;
				}
				that[(A4h + e6t.X6 + h0T)](that[(A9h + e6t.E0T)][(Q7g + k7A)][(e0A + h0T)](), false);
				that[o8]();
			})[(i9T)]('keyup.editor-datetime', function () {
				if (that[(e6t.P8 + U9T)][(N8 + M2h + s5h + e6t.n8 + k3T)][(F4g)]((F4 + Y4A + i3h + H3A + i3h + u9h + V9g))) {
					that[(d3)](that[(I0h)][C0A][(d3)](), false);
				}
			});

			this[(e6t.P8 + e6t.C0T + e6t.E0T)][N3A][(e6t.C0T + e6t.F0T)]((R1T + n4h + E1T + G7h + e7A), (b6 + M0A), function () {
				var I = "osi", h5T = "tp", x5 = "eOu", c4A = "rit", g5h = "_w", F7A = "_setTime", Q6 = "tT", f7A = "Out", S6h = "_wri", Y7g = "CH", F9 = 'ours', E2h = 'mpm', d5T = "sCla", s0T = "and",
						y6T = "etCa", R7h = "Tit", Q1h = "FullY", R2A = "setUTC", M3g = "sClas", h1A = "Cal", j0h = "ctM", m4g = "orr", S7A = 'th', select = $(this), val = select[d3]();
				if (select[n7A](classPrefix + (C7 + O7h + e6t.l7h + G7h + S7A))) {
					that[(p2 + N8 + m4g + e6t.n8 + j0h + e6t.C0T + e6t.I2A + T8T)](that[e6t.s3T][K6h], val);
					that[(p2 + e6t.s3T + e6t.n8 + e6t.v7T + V9 + r9)]();
					that[(p2 + Q3A + h1A + e6t.X6 + e6t.F0T + I6)]();
				} else if (select[(p8T + M3g + e6t.s3T)](classPrefix + '-year')) {
					that[e6t.s3T][(h9 + J4T + h0T + e6t.X6 + H3h)][(R2A + Q1h + e6t.n8 + U9)](val);
					that[(m1h + Z5 + R7h + e6t.t3T)]();
					that[(m1h + y6T + h0T + s0T + m5)]();
				} else if (select[n7A](classPrefix + '-hours') || select[(p8T + d5T + N6)](classPrefix + (C7 + E1T + E2h))) {
					if (that[e6t.s3T][(J9g)][(T8T + x5h + e6t.s3T + T5A + G8A)]) {
						var hours = $(that[I0h][N3A])[T4g]('.' + classPrefix + (C7 + n4h + F9))[(d3)]() * 1,
								pm = $(that[I0h][(V9A + e6t.F0T + e6t.v7T + e6t.X6 + B6g + m5)])[(e6t.w5T + Z8T + e6t.F0T + e6t.P8)]('.' + classPrefix + (C7 + E1T + T7 + O7h))[(A4h + P7T)]() === 'pm';
						that[e6t.s3T][e6t.P8][(e6t.s3T + e6t.n8 + j8 + V9 + Y7g + e6t.C0T + Z7T + k3T + e6t.s3T)](hours === 12 && !pm ? 0 : pm && hours !== 12 ? hours + 12 : hours);
					} else {
						that[e6t.s3T][e6t.P8][S5h](val);
					}
					that[(p2 + Q3A + V9 + Z8T + L6h)]();
					that[(S6h + p3T + f7A + J4T + Z7T + e6t.v7T)](true);
					onChange();
				} else if (select[n7A](classPrefix + '-minutes')) {
					that[e6t.s3T][e6t.P8][S4h](val);
					that[(p2 + e6t.s3T + e6t.n8 + Q6 + Z8T + e6t.E0T + e6t.n8)]();
					that[(p2 + M4h + f5A + p3T + R3 + k7A + J4T + k7A)](true);
					onChange();
				} else if (select[(g4g + z4A + e6t.X6 + e6t.s3T + e6t.s3T)](classPrefix + '-seconds')) {
					that[e6t.s3T][e6t.P8][(e6t.s3T + e6t.n8 + z6 + h4T + r4A + e6t.s3T)](val);
					that[F7A]();
					that[(g5h + c4A + x5 + h5T + Z7T + e6t.v7T)](true);
					onChange();
				}
				that[(A9h + e6t.E0T)][C0A][(T6 + e6t.U8h + e6t.s3T)]();
				that[(V0h + I + N5A)]();
			})[(i9T)]('click', function (e) {
				var M3A = 'mont', I6g = "CM", K9h = 'yea', w4g = "setUTCFullYear", r2A = "Ut", r3T = "opti", B3A = "dI", z4 = "selectedIndex", g0g = 'Do', j1 = "electedIndex", u8T = "lec",
						S5 = "Inde", k = 'nU', b9A = "tTit", D3g = "Mont", z9T = "_correctMonth", u9 = 'Ri', H0h = 'con', c7T = "play", g6h = "nth", f2T = 'conLe', c8h = "tar", G9T = "ropag",
						J7h = "eNam", nodeName = e[q6h][(e6t.F0T + e6t.C0T + e6t.P8 + J7h + e6t.n8)][(W8T + R9h + M4h + m5 + Y1h + e6t.s3T + e6t.n8)]();
				if (nodeName === 'select') {
					return;
				}
				e[(e6t.s3T + W8T + J4T + S3 + G9T + e6t.X6 + e6t.v7T + X0g + e6t.F0T)]();
				if (nodeName === (J8A + M0A + M0A + q1h)) {
					var button = $(e[(c8h + m7 + e6t.v7T)]), parent = button.parent(), select;
					if (parent[(p8T + e6t.s3T + z4A + f3 + e6t.s3T)]((b1h + e3h + V9g + M1T))) {
						return;
					}
					if (parent[n7A](classPrefix + (C7 + i3h + f2T + H2T + M0A))) {
						that[e6t.s3T][(d6A + a0)][(Q3A + m8T + t3g + b5h + g6h)](that[e6t.s3T][(h9 + c7T)][M5h]() - 1);
						that[n5h]();
						that[k0T]();
						that[(I0h)][(Z8T + e6t.F0T + J4T + k7A)][(F4T)]();
					} else if (parent[n7A](classPrefix + (C7 + i3h + H0h + u9 + o4h + n4h + M0A))) {
						that[z9T](that[e6t.s3T][(J1 + X3h + H3h)], that[e6t.s3T][K6h][(b5T + e6t.n8 + e6t.v7T + n9T + V9 + t3g + D3g + T8T)]() + 1);
						that[(m1h + e6t.n8 + b9A + e6t.t3T)]();
						that[k0T]();
						that[(I0h)][(B6g + J4T + Z7T + e6t.v7T)][(e6t.w5T + f9)]();
					} else if (parent[n7A](classPrefix + (C7 + i3h + z0g + k + q4A))) {
						select = parent.parent()[T4g]((H3A + G4 + U8 + M0A))[0];
						select[(e6t.s3T + x7T + h4T + e6t.v7T + L2 + S5 + J4h)] = select[(e6t.s3T + e6t.n8 + u8T + p3T + e6t.P8 + H2A + a7h + J4h)] !== select[(o9T + e6t.v7T + t2 + e6t.s3T)].length - 1 ? select[(e6t.s3T + j1)] + 1 : 0;
						$(select)[w5]();
					} else if (parent[(g4g + t3g + X3h + N6)](classPrefix + (C7 + i3h + R1T + e6t.l7h + G7h + g0g + j0A + G7h))) {
						select = parent.parent()[(T4g)]((H3A + J2T + J3h + U8 + M0A))[0];
						select[z4] = select[(e6t.s3T + R9A + e6t.v7T + e6t.n8 + B3A + e6t.F0T + a7h + J4h)] === 0 ? select[(r3T + i9T + e6t.s3T)].length - 1 : select[z4] - 1;
						$(select)[w5]();
					} else {
						if (!that[e6t.s3T][e6t.P8]) {
							that[e6t.s3T][e6t.P8] = that[(p2 + e6t.t6h + p3T + g2T + r2A + N8)](new Date());
						}
						that[e6t.s3T][e6t.P8][x0h](1);
						that[e6t.s3T][e6t.P8][w4g](button.data((K9h + K3A)));
						that[e6t.s3T][e6t.P8][(e6t.s3T + e6t.n8 + e6t.v7T + n9T + V9 + I6g + i9T + e6t.v7T + T8T)](button.data((M3A + n4h)));
						that[e6t.s3T][e6t.P8][(e6t.s3T + Z5 + n9T + V9 + t3g + I2h + p3T)](button.data('day'));
						that[W6g](true);
						setTimeout(function () {
							that[k5]();
						}, 10);
						onChange();
					}
				} else {
					that[(I0h)][(t4 + e6t.v7T)][(T6 + c6)]();
				}
			});
		},
		_compareDates: function (a, b) {
			var Z2A = "_dateToUtcString";
			return this[Z2A](a) === this[(p2 + e6t.P8 + e6t.X6 + e6t.v7T + w7A + n9T + e6t.v7T + N8 + i9 + O2T + B6g + b5T)](b);
		},
		_correctMonth: function (date, month) {
			var i0 = "TCMo", F0 = "Date", v5 = "setUTCMonth", L8A = "CDate", e8A = "getUT", y1 = "Ye", x9g = "Ful", R8h = "tUT", F0A = "_daysInMonth",
					days = this[F0A](date[(b5T + e6t.n8 + R8h + t3g + x9g + h0T + y1 + e6t.X6 + k3T)](), month), correctDays = date[(e8A + L8A)]() > days;
			date[v5](month);
			if (correctDays) {
				date[(e6t.s3T + Z5 + e9A + F0)](days);
				date[(e6t.s3T + Z5 + n9T + i0 + e6t.I2A + T8T)](month);
			}
		},
		_daysInMonth: function (year, month) {
			var isLeap = ((year % 4) === 0 && ((year % 100) !== 0 || (year % 400) === 0)), months = [31, (isLeap ? 29 : 28), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
			return months[month];
		},
		_dateToUtc: function (s) {
			var w1A = "nut", Z0A = "getHours", o0g = "getDate", B4 = "tMo";
			return new Date(Date[e9A](s[p1h](), s[(b5T + e6t.n8 + B4 + e6t.F0T + e6t.v7T + T8T)](), s[o0g](), s[Z0A](), s[(b5T + e6t.n8 + e6t.v7T + w7 + Z8T + w1A + e6t.n8 + e6t.s3T)](), s[m5h]()));
		},
		_dateToUtcString: function (d) {
			var Q5h = "Month";
			return d[r9g]() + '-' + this[H2h](d[(m7 + j8 + V9 + t3g + Q5h)]() + 1) + '-' + this[H2h](d[t0T]());
		},
		_hide: function () {
			var F7h = 'sc', M7A = 'Bod', k6T = "cont", m3T = "names", namespace = this[e6t.s3T][(m3T + J4T + e6t.X6 + N8 + e6t.n8)];
			this[I0h][(k6T + x9T + i8T)][(e6t.P8 + e6t.n8 + e6t.v7T + e6t.X6 + N8 + T8T)]();
			$(window)[r3A]('.' + namespace);
			$(document)[(e6t.C0T + e6t.w5T + e6t.w5T)]((H7h + J2T + a6 + e6t.l7h + G8h + o7) + namespace);
			$((M1T + z0 + o7 + C8 + G3T + Z3 + M7A + C9A + m8 + e6t.l7h + E7T + s9 + M0A))[(r3A)]((F7h + R4T + J3h + J3h + o7) + namespace);
			$((v9T + S2))[(r3A)]((R1T + J3h + u8 + H7h + o7) + namespace);
		},
		_hours24To12: function (val) {
			return val === 0 ? 12 : val > 12 ? val - 12 : val;
		},
		_htmlDay: function (day) {
			var P4 = "day", N0h = "month", E6g = "today", A4 = 'ay', n8A = 'ty';
			if (day.empty) {
				return (V4 + M0A + M1T + I9g + R1T + Q1 + H3A + c9g + J2T + T7 + n8A + X4T + M0A + M1T + J5);
			}
			var classes = [(M1T + A4)], classPrefix = this[N8][i0g];
			if (day[T3T]) {
				classes[(m1T + e6t.s3T + T8T)]((b1h + H3A + E1T + D6h));
			}
			if (day[E6g]) {
				classes[(J4T + g8h + T8T)]((V0A + M1T + E1T + C9A));
			}
			if (day[A7g]) {
				classes[(J4T + Z7T + e6t.s3T + T8T)]('selected');
			}
			return '<td data-day="' + day[(e6t.P8 + a0)] + (a6h + R1T + J3h + Y5A + c9g) + classes[(a6T + P1 + e6t.F0T)](' ') + '">' + '<button class="' + classPrefix + '-button ' + classPrefix + '-day" type="button" ' + 'data-year="' + day[(H3h + n0T)] + (a6h + M1T + E1T + M0A + E1T + C7 + O7h + e6t.l7h + V5T + c9g) + day[N0h] + '" data-day="' + day[(e6t.P8 + e6t.X6 + H3h)] + '">' + day[P4] + (q8g + u9h + b6g + M0A + e6t.l7h + G7h + J5) + (q8g + M0A + M1T + J5);
		},
		_htmlMonth: function (year, month) {
			var z2T = "thH", V2h = "_ht", O8g = 'hea', W4g = 'um', O3 = 'eekN', n2 = "WeekNu", C8A = "sho", A5h = "_htmlWeekOfYear", q2T = "showWeekNumber", k1h = "mlD", S2h = "TCD", I1A = "nArr",
					E7 = "leDay", e3g = "isa", T6h = "_compareDates", V1 = "Se", F7T = "TC", s1A = "tSeco", E3h = "maxDate", l3A = "inD", d9A = "Day", j6h = "tDay", u0T = "getUTCDay", X1h = "ysInMon",
					y8h = "ToU", now = this[(p2 + M3 + e6t.n8 + y8h + e6t.v7T + N8)](new Date()), days = this[(N2h + X1h + G0T)](year, month), before = new Date(Date[e9A](year, month, 1))[u0T](),
					data = [], row = [];
			if (this[N8][(S1 + k3T + e6t.s3T + j6h)] > 0) {
				before -= this[N8][(e6t.w5T + c0g + O8 + d9A)];
				if (before < 0) {
					before += 7;
				}
			}
			var cells = days + before, after = cells;
			while (after > 7) {
				after -= 7;
			}
			cells += 7 - after;
			var minDate = this[N8][(e6t.E0T + l3A + e6t.X6 + e6t.v7T + e6t.n8)], maxDate = this[N8][E3h];
			if (minDate) {
				minDate[S5h](0);
				minDate[S4h](0);
				minDate[(v7 + s1A + e6t.F0T + e6t.P8 + e6t.s3T)](0);
			}
			if (maxDate) {
				maxDate[S5h](23);
				maxDate[(e6t.s3T + e6t.n8 + j8 + F7T + w7 + B6g + Z7T + e6t.v7T + f2)](59);
				maxDate[(v7 + e6t.v7T + V1 + N8 + i9T + N6T)](59);
			}
			for (var i = 0, r = 0; i < cells; i++) {
				var day = new Date(Date[(m8T + t3g)](year, month, 1 + (i - before))), selected = this[e6t.s3T][e6t.P8] ? this[T6h](day, this[e6t.s3T][e6t.P8]) : false, today = this[T6h](day, now),
						empty = i < before || i >= (days + before), disabled = (minDate && day < minDate) || (maxDate && day > maxDate), disableDays = this[N8][(e6t.P8 + e3g + e6t.u6 + E7 + e6t.s3T)];
				if ($[(Z9A + y2h + H3h)](disableDays) && $[(Z8T + I1A + a0)](day[(b4 + n9T + S2h + a0)](), disableDays) !== -1) {
					disabled = true;
				} else if (typeof disableDays === (H2T + f4g + O8h + i3h + e6t.l7h + G7h) && disableDays(day) === true) {
					disabled = true;
				}
				var dayConfig = {day: 1 + (i - before), month: month, year: year, selected: selected, today: today, disabled: disabled, empty: empty};
				row[G3h](this[(p2 + z7A + k1h + e6t.X6 + H3h)](dayConfig));
				if (++r === 7) {
					if (this[N8][q2T]) {
						row[X2](this[A5h](i - before, month, year));
					}
					data[(J4T + H6T)]((V4 + M0A + K3A + J5) + row[j3T]('') + '</tr>');
					row = [];
					r = 0;
				}
			}
			var className = this[N8][i0g] + '-table';
			if (this[N8][(C8A + M4h + n2 + e6t.E0T + e6t.u6 + m5)]) {
				className += (I9g + j0A + O3 + W4g + u9h + J2T + K3A);
			}
			return (V4 + M0A + i1h + J2T + I9g + R1T + J3h + E1T + O0h + c9g) + className + '">' + (V4 + M0A + O8g + M1T + J5) + this[(V2h + e6t.E0T + h0T + b5h + e6t.F0T + z2T + S0T + e6t.P8)]() + '</thead>' + '<tbody>' + data[j3T]('') + (q8g + M0A + c0 + C9A + J5) + '</table>';
		},
		_htmlMonthHead: function () {
			var N1A = "umber", l4A = "wWee", T3h = "firstDay", a = [], firstDay = this[N8][T3h], i18n = this[N8][a0T], dayName = function (day) {
				var W5T = "weekdays";
				day += firstDay;
				while (day >= 7) {
					day -= 7;
				}
				return i18n[W5T][day];
			};
			if (this[N8][(Z4 + e6t.C0T + l4A + g6T + y7 + N1A)]) {
				a[(J4T + Z7T + Z4)]((V4 + M0A + n4h + z1 + M0A + n4h + J5));
			}
			for (var i = 0; i < 7; i++) {
				a[G3h]((V4 + M0A + n4h + J5) + dayName(i) + (q8g + M0A + n4h + J5));
			}
			return a[(a6T + P1 + e6t.F0T)]('');
		},
		_htmlWeekOfYear: function (d, m, y) {
			var x4 = 'ek', date = new Date(y, m, d, 0, 0, 0, 0);
			date[J2](date[(b5T + e6t.n8 + e6t.v7T + J0 + Y5)]() + 4 - (date[(b4 + J0 + e6t.X6 + H3h)]() || 7));
			var oneJan = new Date(y, 0, 1), weekNum = Math[(S3A + Z8T + h0T)]((((date - oneJan) / 86400000) + 1) / 7);
			return (V4 + M0A + M1T + I9g + R1T + K9A + c9g) + this[N8][i0g] + (C7 + j0A + J2T + x4 + Q9) + weekNum + (q8g + M0A + M1T + J5);
		},
		_options: function (selector, values, labels) {
			var g3T = "Pr";
			if (!labels) {
				labels = values;
			}
			var select = this[(e6t.P8 + U9T)][(T0A + e6t.v7T + e6t.X6 + Z8T + e6t.F0T + m5)][(e6t.w5T + Z8T + N4g)]('select.' + this[N8][(N8 + F9A + g3T + e6t.n8 + e6t.w5T + d3g)] + '-' + selector);
			select.empty();
			for (var i = 0, ien = values.length; i < ien; i++) {
				select[W5A]((V4 + e6t.l7h + q4A + r0A + I9g + Y4A + E1T + J3h + g9g + c9g) + values[i] + '">' + labels[i] + '</option>');
			}
		},
		_optionSet: function (selector, val) {
			var y6g = "unknown", u6A = "tex", C4T = "ldre", V4A = "ssPre", b1T = "ainer",
					select = this[I0h][(N8 + e6t.C0T + e6t.I2A + b1T)][(e6t.w5T + Z8h)]('select.' + this[N8][(N8 + h0T + e6t.X6 + V4A + e6t.w5T + Z8T + J4h)] + '-' + selector),
					span = select.parent()[(N8 + T8T + Z8T + C4T + e6t.F0T)]('span');
			select[(A4h + e6t.X6 + h0T)](val);
			var selected = select[(S1 + e6t.F0T + e6t.P8)]('option:selected');
			span[(z7A + o2h)](selected.length !== 0 ? selected[(u6A + e6t.v7T)]() : this[N8][(Z8T + T5A + c7)][y6g]);
		},
		_optionsTime: function (select, count, inc) {
			var W6 = 'ptio', m9T = 'lect', I8 = "Pref", classPrefix = this[N8][(N8 + h0T + K3 + I8 + d3g)],
					sel = this[I0h][(N8 + M2h + t5h + k3T)][(e6t.w5T + Z8T + e6t.F0T + e6t.P8)]((k2T + m9T + o7) + classPrefix + '-' + select), start = 0, end = count,
					render = count === 12 ? function (i) {
						return i;
					} : this[(V0h + c2)];
			if (count === 12) {
				start = 1;
				end = 13;
			}
			for (var i = start; i < end; i += inc) {
				sel[(e6t.X6 + k9h + e6t.F0T + e6t.P8)]((V4 + e6t.l7h + W6 + G7h + I9g + Y4A + E1T + J3h + L0A + J2T + c9g) + i + '">' + render(i) + (q8g + e6t.l7h + q4A + M0A + J7 + G7h + J5));
			}
		},
		_optionsTitle: function (year, month) {
			var q5T = "ang", z2h = "_r", t3A = "months", a8A = "_range", L7 = 'mo', i4T = "_opt", T3 = "llYear", E3A = "tFu", k0A = "yearRange", j1A = "lYear", I3 = "Fu", m6T = "maxDa", H = "ssPr",
					classPrefix = this[N8][(N8 + h0T + e6t.X6 + H + v2 + Z8T + J4h)], i18n = this[N8][(Z8T + T5A + A6g + e6t.F0T)], min = this[N8][(e6t.E0T + Z8T + e6t.F0T + U4A + e6t.n8)],
					max = this[N8][(m6T + e6t.v7T + e6t.n8)], minYear = min ? min[(b4 + I3 + h0T + j1A)]() : null, maxYear = max ? max[p1h]() : null,
					i = minYear !== null ? minYear : new Date()[p1h]() - this[N8][k0A],
					j = maxYear !== null ? maxYear : new Date()[(b5T + e6t.n8 + E3A + T3)]() + this[N8][(H3h + e6t.n8 + U9 + L + e6t.X6 + e6t.F0T + m7)];
			this[(i4T + Z8T + e6t.C0T + b2A)]((L7 + V5T), this[a8A](0, 11), i18n[t3A]);
			this[(p2 + o9T + e6t.v7T + X0g + e6t.F0T + e6t.s3T)]('year', this[(z2h + q5T + e6t.n8)](i, j));
		},
		_pad: function (i) {
			return i < 10 ? '0' + i : i;
		},
		_position: function () {
			var O4A = "llT", u = "sc", b9T = "ei", X6h = "rH", B7 = "gh", m3h = "Hei", O0T = "fset", offset = this[(e6t.P8 + U9T)][(Z8T + e6t.F0T + i2T)][(e6t.C0T + e6t.w5T + O0T)](),
					container = this[I0h][(T0A + e6t.v7T + s5h + e6t.n8 + k3T)], inputHeight = this[I0h][(B6g + m1T + e6t.v7T)][(e6t.C0T + k7A + e6t.n8 + k3T + m3h + B7 + e6t.v7T)]();
			container[x2h]({top: offset.top + inputHeight, left: offset[(e6t.t3T + d5)]}
			)[i2h]((v9T + M1T + C9A));
			var calHeight = container[(P2 + e6t.v7T + e6t.n8 + X6h + b9T + b5T + T8T + e6t.v7T)](), scrollTop = $((u9h + e6t.l7h + S2))[(u + E0g + O4A + e6t.C0T + J4T)]();
			if (offset.top + inputHeight + calHeight - scrollTop > $(window).height()) {
				var newTop = offset.top - calHeight;
				container[(v2h + e6t.s3T)]((M0A + W2h), newTop < 0 ? 0 : newTop);
			}
		},
		_range: function (start, end) {
			var a = [];
			for (var i = start; i <= end; i++) {
				a[G3h](i);
			}
			return a;
		},
		_setCalander: function () {
			var V4T = "Mon", t5A = "etUT", e8g = "Year", k3 = "lMon";
			if (this[e6t.s3T][(e6t.P8 + Z8T + o4g + a0)]) {
				this[(A9h + e6t.E0T)][(y4A + h0T + j6T + U9)].empty()[W5A](this[(p2 + a4h + k3 + G0T)](this[e6t.s3T][(R4h + z8 + X3h + H3h)][(m7 + e6t.v7T + m8T + t3g + K0 + w1h + h0T + e8g)](), this[e6t.s3T][(R4h + e6t.s3T + O3h + a0)][(b5T + t5A + t3g + V4T + e6t.v7T + T8T)]()));
			}
		},
		_setTitle: function () {
			var O2A = 'month';
			this[f8T]((O2A), this[e6t.s3T][K6h][M5h]());
			this[(p2 + o9T + e6t.v7T + Z8T + i9T + i9 + e6t.n8 + e6t.v7T)]('year', this[e6t.s3T][K6h][r9g]());
		},
		_setTime: function () {
			var l5A = 'ond', i5T = "Minu", f5h = "nS", g0 = "onSet", w3 = "12", J4A = "s24T", C3g = "hours12", u5h = "getUTCHours", d = this[e6t.s3T][e6t.P8], hours = d ? d[u5h]() : 0;
			if (this[e6t.s3T][(J4T + e6t.X6 + k3T + r2T)][C3g]) {
				this[(E0h + J4T + e6t.v7T + X0g + e6t.F0T + D0A)]('hours', this[(p2 + T8T + x5h + J4A + e6t.C0T + w3)](hours));
				this[(p2 + o9T + e6t.v7T + Z8T + g0)]('ampm', hours < 12 ? (E1T + O7h) : (g2A));
			}
			else {
				this[(E0h + J4T + U4T + e6t.C0T + f5h + Z5)]('hours', hours);
			}
			this[f8T]((O7h + i3h + H7T + M0A + N), d ? d[(b4 + n9T + V9 + t3g + i5T + e6t.v7T + e6t.n8 + e6t.s3T)]() : 0);
			this[f8T]((k2T + R1T + l5A + H3A), d ? d[m5h]() : 0);
		},
		_show: function () {
			var T8A = 'dow', l3h = 'ey', c8 = 'oll', p = "_position", x8T = "esp", that = this, namespace = this[e6t.s3T][(V0g + e6t.E0T + x8T + e6t.X6 + N8 + e6t.n8)];
			this[p]();
			$(window)[(e6t.C0T + e6t.F0T)]((H3A + R1T + K3A + c8 + o7) + namespace + ' resize.' + namespace, function () {
				that[p]();
			});
			$('div.DTE_Body_Content')[(e6t.C0T + e6t.F0T)]((H3A + R1T + K3A + s8h + J3h + o7) + namespace, function () {
				that[p]();
			});
			$(document)[i9T]((H7h + l3h + T8A + G7h + o7) + namespace, function (e) {
				var p5A = "ode";
				if (e[n9A] === 9 || e[(K7 + T4T + p5A)] === 27 || e[(K1h + C4A + a7h)] === 13) {
					that[k5]();
				}
			});
			setTimeout(function () {
				$((u9h + e6t.l7h + M1T + C9A))[i9T]('click.' + namespace, function (e) {
					var B1h = "arg", y1h = "arents", parents = $(e[q6h])[(J4T + y1h)]();
					if (!parents[z8A](that[(A9h + e6t.E0T)][(N8 + e6t.C0T + e6t.F0T + t6g + i8T)]).length && e[(e6t.v7T + B1h + e6t.n8 + e6t.v7T)] !== that[(I0h)][(Z8T + v5h + e6t.v7T)][0]) {
						that[(p2 + T8T + b6h + e6t.n8)]();
					}
				});
			}, 10);
		},
		_writeOutput: function (focus) {
			var w4 = "entStrict", y3h = "ntL", s0 = "mome", j3h = "moment", date = this[e6t.s3T][e6t.P8],
					out = window[j3h] ? window[(s0 + e6t.F0T + e6t.v7T)][(Z7T + e6t.v7T + N8)](date, undefined, this[N8][(j1h + e6t.E0T + e6t.n8 + y3h + e6t.C0T + y4A + e6t.t3T)], this[N8][(e6t.E0T + U9T + w4)])[k4A](this[N8][(T6 + k3T + O3A + e6t.v7T)]) : date[r9g]() + '-' + this[H2h](date[M5h]() + 1) + '-' + this[(H2h)](date[t0T]());
			this[(e6t.P8 + U9T)][(B6g + m1T + e6t.v7T)][(A4h + e6t.X6 + h0T)](out);
			if (focus) {
				this[(I0h)][(Z8T + e6t.F0T + i2T)][(V3h + Z7T + e6t.s3T)]();
			}
		}
	});
	Editor.DateTime._instance = 0;
	Editor.DateTime.defaults = {
		classPrefix: 'editor-datetime',
		disableDays: null,
		firstDay: 1,
		format: 'YYYY-MM-DD',
		i18n: Editor.defaults.i18n.datetime,
		maxDate: null,
		minDate: null,
		minutesIncrement: 1,
		momentStrict: true,
		momentLocale: 'en',
		onChange: function () {
		},
		secondsIncrement: 1,
		showWeekNumber: false,
		yearRange: 10
	};

	(function () {
		var r7T = "dMa", A7A = "_enabled", a3h = "uploa", C9h = "_picker", X2A = "cker", r1 = "pic", m7h = "pick", j3g = "ker", H4h = "datepicker", r1A = ' />', A0A = "Id", A8T = "prop", c9T = "_val",
				L2A = "_in", z1A = "_addOptions", m2h = 'npu', K9 = "kb", n0g = "hec", m4T = "separator", s1h = "sel", M = "ipOpts", g9h = "optio", Q7h = "sele", C3A = "_lastSet", Y2h = "multiple",
				y4h = "safeId", a9g = "pai", A9A = "or_", F9g = "_ed", W4h = "eI", I7A = "are", L4A = "sswo", B8h = "saf", h9g = "xtend", P6A = "text", T3g = "nly", o5h = "eado", r8h = "_v",
				g3g = "_va", M6A = "rop", b9g = "_input", n6h = "_i", D5A = "ldTy", s6T = "led", t9 = "_inp", Y8 = 'ton', V0T = "plo", D3 = "ieldT",
				fieldTypes = Editor.fieldTypes;

		function _buttonText(conf, text) {
			if (text === null || text === undefined) {
				text = conf.uploadText || 'Choose fileservice...';
			}
			conf._input.find('div.upload button').html(text);
		}

		function _commonUpload(editor, conf, dropCallback) {
			var btnClass = editor.classes.form.button,
					container = $('<div class="editor_upload">'
							+ '		<div class="eu_table">'
							+ '			<div class="row">'
							+ '				<div class="cell upload">'
							+ '					<button class="' + btnClass + '" />'
							+ '					<input type="fileservice"/>'
							+ '				</div>'
							+ '				<div class="cell clearValue">'
							+ '					<button class="' + btnClass + '" />'
							+ '				</div>'
							+ '			</div>'
							+ '			<div class="row second">'
							+ '				<div class="cell">'
							+ '					<div class="drop"><span/></div>'
							+ '				</div>'
							+ '				<div class="cell">'
							+ '					<div class="rendered"/>'
							+ '				</div>'
							+ '			</div>'
							+ '		</div>'
							+ '</div>');
			conf._input = container;
			conf._input = true;
			_buttonText(conf);
			if (window.FileReader && conf.dragDrop !== false) {
				container.find('div.drop span').text(conf.dragDropText || 'Drag and drop a file here to upload');
				var dragDrop = container.find('div.drop');
				dragDrop.on('drop', function (e) {
					if (conf._enabled) {
						Editor.upload(editor, conf, e.originalEvent.dataTransfer.files, _buttonText, dropCallback);
						dragDrop.removeClass('over');
					}
					return false;
				}).on('dragleave dragexit', function (e) {
					if (conf._enabled) {
						dragDrop.removeClass('over');
					}
					return false;
				}).on('dragover', function (e) {
					if (conf._enabled) {
						dragDrop.addClass('over');
					}
					return false;
				});

				editor.on('open', function () {
					$('body').on('dragover.DTE_Upload drop.DTE_Upload', function (e) {
						return false;
					});
				}).on('close', function () {
					$('body').off('dragover.DTE_Upload drop.DTE_Upload');
				});
			} else {
				container.addClass('noDrop');
				container.append(container.find('div.rendered'));
			}
			container.find('div.clearValue button').on('click', function () {
				Editor.fieldTypes.upload.set.call(editor, conf, '');
			});
			container.find('input[type=file]').on('change', function () {
				Editor.upload(editor, conf, this.files, _buttonText, function (ids) {
					dropCallback.call(editor, ids);
					container.find('input[type=file]').val('');
				});
			});
			return container;
		}

		function _triggerChange(input) {
			setTimeout(function () {
				input.trigger('change', {editor: true, editorSet: true});
			}, 0);
		}

		var baseFieldType = $.extend(true, {}, Editor.models.fieldType, {
			get: function (conf) {
				return conf[(t9 + Z7T + e6t.v7T)][(d3)]();
			},
			set: function (conf, val) {
				conf[(n6h + B5)][(A4h + e6t.X6 + h0T)](val);
				_triggerChange(conf[b9g]);
			},
			enable: function (conf) {
				var e9g = 'isab';
				conf[b9g][(J4T + k3T + o9T)]((M1T + e9g + J3h + J2T + M1T), false);
			},
			disable: function (conf) {
				var C = 'is';
				conf[b9g][(J4T + M6A)]((M1T + C + L9h + J3h + M8), true);
			},
			canReturnSubmit: function (conf, node) {
				return true;
			}
		});
		fieldTypes.hidden = {
			create: function (conf) {
				conf[(g3g + h0T)] = conf[(e0A + h0T + E6h)];
				return null;
			},
			get: function (conf) {
				return conf[(r8h + e6t.X6 + h0T)];
			},
			set: function (conf, val) {
				conf[(r8h + P7T)] = val;
			}
		};
		fieldTypes.readonly = $.extend(true, {}, baseFieldType, {
			create: function (conf) {
				var Y6T = "afe";
				conf[b9g] = $((V4 + i3h + f4T + b6g + n9))[(e6t.X6 + e6t.v7T + O2T)]($[(e6t.h4 + e6t.v7T + p6 + e6t.P8)]({
					id: Editor[(e6t.s3T + Y6T + N3 + e6t.P8)](conf[(b6h)]),
					type: 'text',
					readonly: (H6 + o9h + e6t.l7h + r0T + C9A)
				}, conf[q2A] || {}));
				return conf[(p2 + Z8T + v5h + e6t.v7T)][0];
			}
		});
		fieldTypes.text = $.extend(true, {}, baseFieldType, {
			create: function (conf) {
				var w9A = "eId";
				conf[(p2 + B6g + J4T + k7A)] = $((V4 + i3h + G7h + q4A + b6g + n9))[(z6A + k3T)]($[B6T]({id: Editor[(B8h + w9A)](conf[(b6h)]), type: 'text'}, conf[(V7 + O2T)] || {}));
				return conf[b9g][0];
			}
		});
		fieldTypes.password = $.extend(true, {}, baseFieldType, {
			create: function (conf) {
				conf[(t9 + k7A)] = $('<input/>')[(e6t.X6 + e6t.v7T + O2T)]($[B6T]({id: Editor[(e6t.s3T + e6t.X6 + h3 + N3 + e6t.P8)](conf[(b6h)]), type: 'password'}, conf[q2A] || {}));
				return conf[(p2 + Z8T + e6t.F0T + J4T + Z7T + e6t.v7T)][0];
			}
		});
		fieldTypes.textarea = $.extend(true, {}, baseFieldType, {
			create: function (conf) {
				conf[(n6h + e6t.F0T + J4T + k7A)] = $('<textarea/>')[q2A]($[(e6t.n8 + J4h + v5A + e6t.P8)]({id: Editor[(B8h + W4h + e6t.P8)](conf[b6h])}, conf[(e6t.X6 + I2T + k3T)] || {}));
				return conf[b9g][0];
			},
			canReturnSubmit: function (conf, node) {
				return false;
			}
		});
		fieldTypes.select = $.extend(true, {}, baseFieldType, {
			_addOptions: function (conf, opts, append) {
				var elOpts = conf._input[0].options, countOffset = 0;
				if (!append) {
					elOpts.length = 0;
					if (conf.placeholder !== undefined) {
						var placeholderValue = conf.placeholderValue !== undefined ? conf.placeholderValue : '';
						countOffset += 1;
						elOpts[0] = new Option(conf.placeholder, placeholderValue);
						var disabled = conf.placeholderDisabled !== undefined ? conf.placeholderDisabled : true;
						elOpts[0].hidden = disabled;
						elOpts[0].disabled = disabled;
						elOpts[0]._editor_val = placeholderValue;
					}
				} else {
					countOffset = elOpts.length;
				}
				if (opts) {
					Editor.pairs(opts, conf.optionsPair, function (val, label, i, attr) {
						var option = new Option(label, val);
						option._editor_val = val;
						if (attr) {
							$(option).attr(attr);
						}
						elOpts[i + countOffset] = option;
					});
				}
			},
			create: function (conf) {
				conf._input = $('<select/>').attr($.extend({id: Editor.safeId(conf.id), multiple: conf.multiple === true}, conf.attr || {})).on('change.dte', function (e, d) {
					if (!d || !d.editor) {
						conf._lastSet = fieldTypes.select.get(conf);
					}
				});
				fieldTypes.select._addOptions(conf, conf.options || conf.ipOpts);
				return conf._input[0];
			},
			update: function (conf, options, append) {
				fieldTypes.select._addOptions(conf, options, append);
				var lastSet = conf._lastSet;
				if (lastSet !== undefined) {
					fieldTypes.select.set(conf, lastSet, true);
				}
				_triggerChange(conf._input);
			},
			get: function (conf) {
				var val = conf._input.find('option:selected').map(function () {
					return this._editor_val;
				}).toArray();
				if (conf.multiple) {
					return conf.separator ? val.join(conf.separator) : val;
				}
				return val.length ? val[0] : null;
			},
			set: function (conf, val, localUpdate) {
				if (!localUpdate) {
					conf._lastSet = val;
				}
				if (conf.multiple && conf.separator && !$.isArray(val)) {
					val = typeof val === 'string' ? val.split(conf.separator) : [];
				} else if (!$.isArray(val)) {
					val = [val];
				}
				var i, len = val.length, found, allFound = false, options = conf._input.find('option');
				conf._input.find('option').each(function () {
					found = false;
					for (i = 0; i < len; i++) {
						if (this._editor_val == val[i]) {
							found = true;
							allFound = true;
							break;
						}
					}
					this.selected = found;
				});
				if (conf.placeholder && !allFound && !conf.multiple && options.length) {
					options[0].selected = true;
				}
				if (!localUpdate) {
					_triggerChange(conf._input);
				}
				return allFound;
			},
			destroy: function (conf) {
				conf._input.off('change.dte');
			}
		});
		fieldTypes.checkbox = $.extend(true, {}, baseFieldType, {
			_addOptions: function (conf, opts, append) {
				var u3 = "optionsPair", val, label, jqInput = conf[b9g], offset = 0;
				if (!append) {
					jqInput.empty();
				} else {
					offset = $('input', jqInput).length;
				}
				if (opts) {
					Editor[(a9g + k3T + e6t.s3T)](opts, conf[u3], function (val, label, i, attr) {
						var M3h = "_edit";
						jqInput[W5A]((V4 + M1T + i3h + Y4A + J5) + '<input id="' + Editor[y4h](conf[(b6h)]) + '_' + (i + offset) + (a6h + M0A + k7 + J2T + c9g + R1T + Z9g + R1T + H7h + u9h + e6t.l7h + f9A + K5A) + (V4 + J3h + E1T + u9h + J2T + J3h + I9g + H2T + e6t.l7h + K3A + c9g) + Editor[y4h](conf[(b6h)]) + '_' + (i + offset) + '">' + label + (q8g + J3h + E1T + d9T + J5) + (q8g + M1T + z0 + J5));
						$((i3h + m2h + M0A + F4 + J3h + u7 + M0A), jqInput)[q2A]((d3T + g9g), val)[0][(M3h + A9A + e0A + h0T)] = val;
						if (attr) {
							$('input:last', jqInput)[(q2A)](attr);
						}
					});
				}
			},
			create: function (conf) {
				conf[(p2 + Z8T + B5)] = $('<div />');
				fieldTypes[(Z3A + e6t.n8 + N8 + g6T + X1A + J4h)][z1A](conf, conf[(e6t.C0T + J4T + U4T + u2h)] || conf[M]);
				return conf[(L2A + i2T)][0];
			},
			get: function (conf) {
				var c6h = "unselectedValue", I8h = "dV", out = [],
						selected = conf[(n6h + f9g + Z7T + e6t.v7T)][(e6t.w5T + Z8T + e6t.F0T + e6t.P8)]((i3h + Q8 + F4 + R1T + Z9g + R1T + H7h + M8));
				if (selected.length) {
					selected[(S0T + N8 + T8T)](function () {
						var i2 = "itor_v";
						out[(J4T + Z7T + Z4)](this[(p2 + L2 + i2 + e6t.X6 + h0T)]);
					});
				} else if (conf[(d2h + s1h + e6t.n8 + T1h + e6t.n8 + I8h + P7T + Z7T + e6t.n8)] !== undefined) {
					out[(J4T + H6T)](conf[c6h]);
				}
				return conf[m4T] === undefined || conf[m4T] === null ? out : out[(a6T + e6t.C0T + B6g)](conf[(e6t.s3T + e6t.n8 + J4T + e6t.X6 + k3T + V7 + f8)]);
			},
			set: function (conf, val) {
				var r4 = "ator", S5A = "split", jqInputs = conf[b9g][(S1 + N4g)]((b7 + q4A + L0A + M0A));
				if (!$[(Z8T + e6t.s3T + N3g + Z4g + e6t.X6 + H3h)](val) && typeof val === (q6A)) {
					val = val[(S5A)](conf[(e6t.s3T + e6t.n8 + M5T + k3T + r4)] || '|');
				} else if (!$[(Z8T + L1A + k3T + o9g + H3h)](val)) {
					val = [val];
				}
				var i, len = val.length, found;
				jqInputs[B1A](function () {
					found = false;
					for (i = 0; i < len; i++) {
						if (this[(p2 + e6t.n8 + e6t.P8 + Z8T + J6h + c9T)] == val[i]) {
							found = true;
							break;
						}
					}
					this[(N8 + T8T + e6t.n8 + N8 + K7 + e6t.P8)] = found;
				});
				_triggerChange(jqInputs);
			},
			enable: function (conf) {
				var m2T = 'dis';
				conf[(n6h + e6t.F0T + m1T + e6t.v7T)][(T4g)]('input')[A8T]((m2T + E1T + u9h + V9g + M1T), false);
			},
			disable: function (conf) {
				var r7 = 'led';
				conf[(p2 + Z8T + f9g + Z7T + e6t.v7T)][(e6t.w5T + Z8h)]('input')[A8T]((b1h + H3A + E1T + u9h + r7), true);
			},
			update: function (conf, options, append) {
				var K3h = "box", checkbox = fieldTypes[(N8 + n0g + g6T + K3h)], currVal = checkbox[(b5T + Z5)](conf);
				checkbox[z1A](conf, options, append);
				checkbox[Q3A](conf, currVal);
			}
		});
		fieldTypes.radio = $.extend(true, {}, baseFieldType, {
			_addOptions: function (conf, opts, append) {
				var f4 = "Pai", d8h = "air", val, label, jqInput = conf[b9g], offset = 0;
				if (!append) {
					jqInput.empty();
				} else {
					offset = $('input', jqInput).length;
				}
				if (opts) {
					Editor[(J4T + d8h + e6t.s3T)](opts, conf[(e6t.C0T + J4T + U4T + e6t.C0T + b2A + f4 + k3T)], function (val, label, i, attr) {
						var A7T = 'abel';
						jqInput[W5A]((V4 + M1T + i3h + Y4A + J5) + '<input id="' + Editor[y4h](conf[(b6h)]) + '_' + (i + offset) + (a6h + M0A + C9A + h1h + c9g + K3A + E1T + M1T + J7 + a6h + G7h + p9h + c9g) + conf[(V0g + e6t.E0T + e6t.n8)] + '" />' + (V4 + J3h + A7T + I9g + H2T + e6t.l7h + K3A + c9g) + Editor[(e6t.s3T + e6t.X6 + e6t.w5T + e6t.n8 + A0A)](conf[b6h]) + '_' + (i + offset) + '">' + label + '</label>' + '</div>');
						$((t0g + L0A + M0A + F4 + J3h + E1T + H3A + M0A), jqInput)[(e6t.X6 + t9A)]((Y4A + x4h + g9g), val)[0][(F9g + Z8T + J6h + p2 + d3)] = val;
						if (attr) {
							$((i3h + f4T + L0A + M0A + F4 + J3h + E1T + H3A + M0A), jqInput)[(V7 + O2T)](attr);
						}
					});
				}
			},
			create: function (conf) {
				var z0h = "pOp", K4A = "radio";
				conf[(p2 + B6g + i2T)] = $((V4 + M1T + z0 + r1A));
				fieldTypes[K4A][z1A](conf, conf[(g9h + b2A)] || conf[(Z8T + z0h + r2T)]);
				this[(i9T)]((s7A), function () {
					conf[(p2 + Z8T + e6t.F0T + J4T + Z7T + e6t.v7T)][(e6t.w5T + Z8T + e6t.F0T + e6t.P8)]((b7 + q4A + b6g))[B1A](function () {
						var R8g = "cke", c4T = "_preChecked";
						if (this[c4T]) {
							this[(N8 + N7T + R8g + e6t.P8)] = true;
						}
					});
				});
				return conf[(b9g)][0];
			},
			get: function (conf) {
				var el = conf[b9g][(e6t.w5T + Z8T + e6t.F0T + e6t.P8)]('input:checked');
				return el.length ? el[0][(p2 + e6t.n8 + e6t.P8 + Z8T + e6t.v7T + e6t.C0T + k3T + r8h + P7T)] : undefined;
			},
			set: function (conf, val) {
				var e7g = 'ecke', that = this;
				conf[(p2 + Z8T + e6t.F0T + J4T + Z7T + e6t.v7T)][(S1 + e6t.F0T + e6t.P8)]('input')[B1A](function () {
					var y0 = "hecke", F6h = "checked", S7g = "heck", a0g = "ked";
					this[(V0h + k3T + e6t.n8 + x3A + e6t.n8 + N8 + a0g)] = false;
					if (this[(p2 + e6t.n8 + q7 + f8 + p2 + A4h + P7T)] == val) {
						this[(Z3A + h4T + K7 + e6t.P8)] = true;
						this[(V0h + Y2A + t3g + S7g + L2)] = true;
					} else {
						this[F6h] = false;
						this[(V0h + k3T + e6t.n8 + t3g + y0 + e6t.P8)] = false;
					}
				});
				_triggerChange(conf[b9g][T4g]((i3h + f4T + L0A + M0A + F4 + R1T + n4h + e7g + M1T)));
			},
			enable: function (conf) {
				conf[b9g][(e6t.w5T + B6g + e6t.P8)]((b7 + M4T))[A8T]((b1h + e3h + J3h + J2T + M1T), false);
			},
			disable: function (conf) {
				var O6A = 'pu';
				conf[b9g][(S1 + N4g)]((i3h + G7h + O6A + M0A))[(J4T + E0g + J4T)]('disabled', true);
			},
			update: function (conf, options, append) {
				var s7T = "adio", radio = fieldTypes[(k3T + s7T)], currVal = radio[(b5T + Z5)](conf);
				radio[(p2 + e6t.X6 + e6t.P8 + e6t.P8 + I0A + X0g + b2A)](conf, options, append);
				var inputs = conf[(n6h + f9g + k7A)][(e6t.w5T + Z8T + e6t.F0T + e6t.P8)]((h5));
				radio[(e6t.s3T + Z5)](conf, inputs[z8A]((j8T + Y4A + a9h + c9g) + currVal + '"]').length ? currVal : inputs[(c5)](0)[(V7 + O2T)]('value'));
			}
		});
		fieldTypes.date = $.extend(true, {}, baseFieldType, {
			create: function (conf) {
				var i5h = 'da', Y9g = 'typ', L0 = "_282", R3A = "RFC", X7T = "epic", T1 = "dateFormat", N9 = "Fo", u3g = 'ui', E2 = "af";
				conf[b9g] = $('<input />')[q2A]($[(e6t.h4 + e6t.v7T + j6T)]({id: Editor[(e6t.s3T + E2 + W4h + e6t.P8)](conf[(b6h)]), type: (M0A + Y3h + M0A)}
						, conf[q2A]));
				if ($[H4h]) {
					conf[b9g][e1h]((s3h + d4A + g9g + N8T + u3g));
					if (!conf[(e6t.t6h + p3T + N9 + k3T + f7)]) {
						conf[T1] = $[(e6t.P8 + V7 + X7T + g6T + m5)][(R3A + L0 + G8A)];
					}
					setTimeout(function () {
						var A7h = "opt", j4A = "dateIma";
						$(conf[b9g])[(e6t.P8 + e6t.X6 + p3T + J4T + X5h + j3g)]($[(e6t.h4 + p3T + N4g)]({
							showOn: "both", dateFormat: conf[T1], buttonImage: conf[(j4A + m7)], buttonImageOnly: true, onSelect: function () {
								conf[b9g][(e6t.w5T + e6t.C0T + c6)]()[p2h]();
							}
						}, conf[(A7h + e6t.s3T)]));
						$('#ui-datepicker-div')[(N8 + e6t.s3T + e6t.s3T)]('display', (G7h + e6t.l7h + G7h + J2T));
					}, 10);
				} else {
					conf[(p2 + Z8T + B5)][(q2A)]((Y9g + J2T), (i5h + j9A));
				}
				return conf[(n6h + e6t.F0T + J4T + k7A)][0];
			},
			set: function (conf, val) {
				var Y9A = 'ke', i1T = 'pic', V8 = 'sD', O5T = "icke";
				if ($[(e6t.P8 + e6t.X6 + e6t.v7T + w8 + O5T + k3T)] && conf[b9g][(g4g + z4A + e6t.X6 + N6)]((n4h + E1T + V8 + w4A + i1T + Y9A + K3A))) {
					conf[b9g][H4h]((J2), val)[w5]();
				} else {
					$(conf[b9g])[(A4h + e6t.X6 + h0T)](val);
				}
			},
			enable: function (conf) {
				var m9h = 'sa';
				$[(M3 + e6t.n8 + m7h + m5)] ? conf[(p2 + Z8T + e6t.F0T + m1T + e6t.v7T)][(e6t.P8 + e6t.X6 + e6t.v7T + e6t.n8 + r1 + j3g)]((e6t.n8 + V0g + e6t.u6 + h0T + e6t.n8)) : $(conf[(p2 + B6g + m1T + e6t.v7T)])[A8T]((M1T + i3h + m9h + D6h), false);
			},
			disable: function (conf) {
				$[H4h] ? conf[(n6h + v5h + e6t.v7T)][(e6t.t6h + p3T + r1 + g6T + m5)]("disable") : $(conf[b9g])[(A8T)]('disabled', true);
			},
			owns: function (conf, node) {
				return $(node)[(J4T + e6t.X6 + k3T + p6 + e6t.v7T + e6t.s3T)]('div.ui-datepicker').length || $(node)[(F3g + D3h + e6t.s3T)]('div.ui-datepicker-header').length ? true : false;
			}
		});
		fieldTypes.datetime = $.extend(true, {}, baseFieldType, {
			create: function (conf) {
				conf._input = $("<input />").attr($.extend(true, {
					id: Editor.safeId(conf.id),
					type: 'text'
				}, conf.attr));
				conf._picker = new Editor.DateTime(conf._input, $.extend({
					format: conf.format,
					i18n: this.i18n.datetime,
					onChange: function () {
						_triggerChange(conf._input);
					}
				}, conf.opts));
				conf._closeFn = function () {
					conf._picker.hide();
				};
				this.on('close', conf._closeFn);
				return conf._input[0];
			},
			set: function (conf, val) {
				var S9g = "_pick";
				conf[(S9g + m5)][(e0A + h0T)](val);
				_triggerChange(conf[b9g]);
			},
			owns: function (conf, node) {
				var o9A = "owns", M2A = "_picke";
				return conf[(M2A + k3T)][o9A](node);
			},
			errorMessage: function (conf, msg) {
				var B4A = "errorMsg";
				conf[C9h][B4A](msg);
			},
			destroy: function (conf) {
				var S8h = "_closeFn";
				this[(e6t.C0T + e6t.w5T + e6t.w5T)]('close', conf[S8h]);
				conf[(p2 + m7h + m5)][(e6t.P8 + e6t.n8 + O8 + k3T + e6t.C0T + H3h)]();
			},
			minDate: function (conf, min) {
				conf[(V0h + Z8T + X2A)][(e6t.E0T + Z8T + e6t.F0T)](min);
			},
			maxDate: function (conf, max) {
				var A2 = "max";
				conf[C9h][A2](max);
			}
		});
		fieldTypes.upload = $.extend(true, {}, baseFieldType, {
			create: function (conf) {
				var editor = this, container = _commonUpload(editor, conf, function (val) {
					Editor.fieldTypes.upload.set.call(editor, conf, val[0]);
				});
				return container;
			},
			get: function (conf) {
				return conf._val;
			},
			set: function (conf, val) {
				conf._val = val;
				var container = conf._input;
				if (conf.display) {
					var rendered = container.find('div.rendered');
					if (conf._val) {
						rendered.html(conf.display(conf._val));
					} else {
						rendered.empty().append('<span>' + (conf.noFileText || 'No file') + '</span>');
					}
				}
				var button = container.find('div.clearValue button');
				if (val && conf.clearText) {
					button.html(conf.clearText);
					container.removeClass('noClear');
				} else {
					container.addClass('noClear');
				}
				conf._input.find('input').triggerHandler('upload.editor', [conf._val]);
			},
			enable: function (conf) {
				conf._input.find('input').prop('disabled', false);
				conf._enabled = true;
			},
			disable: function (conf) {
				conf._input.find('input').prop('disabled', true);
				conf._enabled = false;
			},
			canReturnSubmit: function (conf, node) {
				return false;
			}
		});
		fieldTypes.uploadMany = $.extend(true, {}, baseFieldType, {
			create: function (conf) {
				var editor = this, container = _commonUpload(editor, conf, function (val) {
					conf._val = conf._val.concat(val);
					Editor.fieldTypes.uploadMany.set.call(editor, conf, conf._val);
				});
				container.addClass('multi').on('click', 'button.remove', function (e) {
					e.stopPropagation();
					var idx = $(this).data('idx');
					conf._val.splice(idx, 1);
					Editor.fieldTypes.uploadMany.set.call(editor, conf, conf._val);
				});
				return container;
			},
			get: function (conf) {
				return conf._val;
			},
			set: function (conf, val) {
				if (!val) {
					val = [];
				}
				if (!$.isArray(val)) {
					throw 'Upload collections must have an array as a value';
				}
				conf._val = val;
				var that = this, container = conf._input;
				if (conf.display) {
					var rendered = container.find('div.rendered').empty();
					if (val.length) {
						var list = $('<ul/>').appendTo(rendered);
						$.each(val, function (i, file) {
							list.append('<li>' + conf.display(file, i)
									+ ' 	<button class="' + that.classes.form.button + ' remove" data-idx="' + i + '">&times;</button>'
									+ '</li>');
						});
					} else {
						rendered.append('<span>' + (conf.noFileText || 'No files') + '</span>');
					}
				}
				conf._input.find('input').triggerHandler('upload.editor', [conf._val]);
			},
			enable: function (conf) {
				conf._input.find('input').prop('disabled', false);
				conf._enabled = true;
			},
			disable: function (conf) {
				conf._input.find('input').prop('disabled', true);
				conf._enabled = true;
			},
			canReturnSubmit: function (conf, node) {
				return false;
			}
		});
	}());

	if (DataTable.ext.editorFields) {
		$.extend(Editor.fieldTypes, DataTable.ext.editorFields);
	}

	DataTable.ext.editorFields = Editor.fieldTypes;
	Editor.files = {};
	Editor.prototype.CLASS = 'Editor';
	Editor.version = '1.6.2';
	return Editor;
}));